summaryrefslogtreecommitdiffstats
path: root/runtime/plugin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:15 +0000
commit6e9cd6b491267e6dff3e3f3f37d8af5f28e40672 (patch)
tree35661af16c4a0ef2a9a8e225d2d5cc82605ea289 /runtime/plugin
parentAdding upstream version 2:9.1.0496. (diff)
downloadvim-6e9cd6b491267e6dff3e3f3f37d8af5f28e40672.tar.xz
vim-6e9cd6b491267e6dff3e3f3f37d8af5f28e40672.zip
Adding upstream version 2:9.1.0698.upstream/2%9.1.0698
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/manpager.vim8
-rw-r--r--runtime/plugin/matchparen.vim8
2 files changed, 6 insertions, 10 deletions
diff --git a/runtime/plugin/manpager.vim b/runtime/plugin/manpager.vim
index 076aca5..6ed6030 100644
--- a/runtime/plugin/manpager.vim
+++ b/runtime/plugin/manpager.vim
@@ -1,6 +1,6 @@
" Vim plugin for using Vim as manpager.
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
-" Last Change: 2022 Oct 17
+" Last Change: 2024 Jul 03
if exists('g:loaded_manpager_plugin')
finish
@@ -20,9 +20,6 @@ function s:ManPager()
endif
syntax on
- " Make this an unlisted, readonly scratch buffer
- setlocal buftype=nofile noswapfile bufhidden=hide nobuflisted readonly
-
" Ensure text width matches window width
setlocal foldcolumn& nofoldenable nonumber norelativenumber
@@ -45,6 +42,9 @@ function s:ManPager()
" Finished preprocessing the buffer, prevent any further modifications
setlocal nomodified nomodifiable
+ " Make this an unlisted, readonly scratch buffer
+ setlocal buftype=nofile noswapfile bufhidden=hide nobuflisted readonly
+
" Set filetype to man even if ftplugin is disabled
setlocal filetype=man
runtime ftplugin/man.vim
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 6c061c9..2899612 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -60,12 +60,8 @@ func s:Highlight_Matching_Pair()
let before = 0
let text = getline(c_lnum)
- let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)')
- if empty(matches)
- let [c_before, c] = ['', '']
- else
- let [c_before, c] = matches[1:2]
- endif
+ let c_before = text->strpart(0, c_col - 1)->slice(-1)
+ let c = text->strpart(c_col - 1)->slice(0, 1)
let plist = split(&matchpairs, '.\zs[:,]')
let i = index(plist, c)
if i < 0