From: Christian Brabandt Date: Sun, 31 May 2026 21:34:51 +0000 (+0000) Subject: runtime(matchit): Update matchit plugin X-Git-Tag: v9.2.0581~1 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e9f8e0fcbe623ebf65bf1e8993d7ee6db57786d4;p=thirdparty%2Fvim.git runtime(matchit): Update matchit plugin Signed-off-by: Christian Brabandt --- diff --git a/runtime/pack/dist/opt/matchit/autoload/matchit.vim b/runtime/pack/dist/opt/matchit/autoload/matchit.vim index 1e660ffd3e..76148c6e5a 100644 --- a/runtime/pack/dist/opt/matchit/autoload/matchit.vim +++ b/runtime/pack/dist/opt/matchit/autoload/matchit.vim @@ -1,6 +1,6 @@ " matchit.vim: (global plugin) Extended "%" matching " autload script of matchit plugin, see ../plugin/matchit.vim -" Last Change: Jan 09, 2026 +" Last Change: June 01, 2026 " Neovim does not support scriptversion if has("vimscript-4") @@ -124,7 +124,7 @@ function matchit#Match_wrapper(word, forward, mode) range let s:all = substitute(s:all, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g') " Just in case there are too many '\(...)' groups inside the pattern, make " sure to use \%(...) groups, so that error E872 can be avoided - let s:all = substitute(s:all, '\\(', '\\%(', 'g') + let s:all = substitute(s:all, s:notslash .. '\zs\\(', '\\%(', 'g') let s:all = '\%(' .. s:all .. '\)' if exists("b:match_debug") let b:match_pat = s:pat @@ -339,8 +339,8 @@ fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline) if table[d] != "-" let backref = substitute(a:matchline, a:prefix .. word .. a:suffix, \ '\' .. table[d], "") - " Are there any other characters that should be escaped? - let backref = escape(backref, '*,:') + " escape magic pattern metacharacters and matchit special characters [,:] + let backref = escape(backref, '\.*[^$~,:') execute s:Ref(ini, d, "start", "len") let ini = strpart(ini, 0, start) .. backref .. strpart(ini, start+len) let tailBR = substitute(tailBR, s:notslash .. '\zs\\' .. d, diff --git a/runtime/pack/dist/opt/matchit/doc/matchit.txt b/runtime/pack/dist/opt/matchit/doc/matchit.txt index e82bacdeb0..31fb466739 100644 --- a/runtime/pack/dist/opt/matchit/doc/matchit.txt +++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt @@ -1,4 +1,4 @@ -*matchit.txt* Extended "%" matching Last change: 2026 Jan 06 +*matchit.txt* Extended "%" matching Last change: 2026 Jun 01 VIM REFERENCE MANUAL by Benji Fisher et al @@ -195,14 +195,6 @@ can be defined in the |filetype-plugin| or autocommand that defines The main variable is |b:match_words|. It is described in the section below on supporting a new language. - *MatchError* *matchit-hl* *matchit-highlight* -MatchError is the highlight group for error messages from the script. By -default, it is linked to WarningMsg. If you do not want to be bothered by -error messages, you can define this to be something invisible. For example, -if you use the GUI version of Vim and your command line is normally white, you -can do > - :hi MatchError guifg=white guibg=white -< *b:match_ignorecase* If you > :let b:match_ignorecase = 1 diff --git a/runtime/pack/dist/opt/matchit/doc/tags b/runtime/pack/dist/opt/matchit/doc/tags index 008c5686d1..f86a672196 100644 --- a/runtime/pack/dist/opt/matchit/doc/tags +++ b/runtime/pack/dist/opt/matchit/doc/tags @@ -1,7 +1,6 @@ :MatchDebug matchit.txt /*:MatchDebug* :MatchDisable matchit.txt /*:MatchDisable* :MatchEnable matchit.txt /*:MatchEnable* -MatchError matchit.txt /*MatchError* [% matchit.txt /*[%* ]% matchit.txt /*]%* b:match_col matchit.txt /*b:match_col* @@ -29,8 +28,6 @@ matchit-configure matchit.txt /*matchit-configure* matchit-debug matchit.txt /*matchit-debug* matchit-details matchit.txt /*matchit-details* matchit-disable matchit.txt /*matchit-disable* -matchit-highlight matchit.txt /*matchit-highlight* -matchit-hl matchit.txt /*matchit-hl* matchit-intro matchit.txt /*matchit-intro* matchit-languages matchit.txt /*matchit-languages* matchit-modes matchit.txt /*matchit-modes* diff --git a/runtime/pack/dist/opt/matchit/plugin/matchit.vim b/runtime/pack/dist/opt/matchit/plugin/matchit.vim index 947f530261..fef2a8ace0 100644 --- a/runtime/pack/dist/opt/matchit/plugin/matchit.vim +++ b/runtime/pack/dist/opt/matchit/plugin/matchit.vim @@ -1,7 +1,7 @@ " matchit.vim: (global plugin) Extended "%" matching " Maintainer: Christian Brabandt -" Version: 1.21 -" Last Change: 2024 May 20 +" Version: 1.22 +" Last Change: 2026 Jun 01 " Repository: https://github.com/chrisbra/matchit " Previous URL:http://www.vim.org/script.php?script_id=39 " Previous Maintainer: Benji Fisher PhD @@ -50,7 +50,7 @@ fun MatchEnable() nnoremap (MatchitNormalForward) :call matchit#Match_wrapper('',1,'n') nnoremap (MatchitNormalBackward) :call matchit#Match_wrapper('',0,'n') xnoremap (MatchitVisualForward) :call matchit#Match_wrapper('',1,'v') - \:if col("''") != col("$") \| exe ":normal! m'" \| endifgv`` + \:if line("''") != line(".") \|\| col("''") != col("$") \| exe ":normal! m'" \| endifgv`` xnoremap (MatchitVisualBackward) :call matchit#Match_wrapper('',0,'v')m'gv`` onoremap (MatchitOperationForward) :call matchit#Match_wrapper('',1,'o') onoremap (MatchitOperationBackward) :call matchit#Match_wrapper('',0,'o')