runtime(matchit): update matchit plugin to v1.20

Commit: 
https://github.com/vim/vim/commit/8cf29e4c4a2af75bf31ef16ef108aea61c165af8
Author: Christian Brabandt <c...@256bit.org>
Date:   Mon May 20 20:02:16 2024 +0200

    runtime(matchit): update matchit plugin to v1.20
    
    fixes: https://github.com/vim/vim/issues/14814
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/pack/dist/opt/matchit/autoload/matchit.vim 
b/runtime/pack/dist/opt/matchit/autoload/matchit.vim
index dc2aba696..aa977488e 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 24, 2022
+"  Last Change: May 20, 2024
 
 " Neovim does not support scriptversion
 if has("vimscript-4")
@@ -87,9 +87,9 @@ function matchit#Match_wrapper(word, forward, mode) range
     let s:last_mps = &mps
     " quote the special chars in 'matchpairs', replace [,:] with \| and then
     " append the builtin pairs (/*, */, #if, #ifdef, #ifndef, #else, #elif,
-    " #endif)
+    " #elifdef, #elifndef, #endif)
     let default = escape(&mps, '[$^.*~\/?]') .. (strlen(&mps) ? "," : "") ..
-      \ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
+      \ 
'\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\%(n\=def\)\=\>:#\s*endif\>'
     " s:all = pattern with all the keywords
     let match_words = match_words .. (strlen(match_words) ? "," : "") .. 
default
     let s:last_words = match_words
@@ -101,6 +101,8 @@ function matchit#Match_wrapper(word, forward, mode) range
       let s:pat = s:ParseWords(match_words)
     endif
     let s:all = substitute(s:pat, s:notslash .. '\zs[,:]\+', '\|', 'g')
+    " un-escape \, to ,
+    let s:all = substitute(s:all, '\,', ',', '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')
@@ -112,6 +114,8 @@ function matchit#Match_wrapper(word, forward, mode) range
     let s:patBR = substitute(match_words .. ',',
       \ s:notslash .. '\zs[,:]*,[,:]*', ',', 'g')
     let s:patBR = substitute(s:patBR, s:notslash .. '\zs:\{2,}', ':', 'g')
+    " un-escape \, to ,
+    let s:patBR = substitute(s:patBR, '\,', ',', 'g')
   endif
 
   " Second step:  set the following local variables:
@@ -534,6 +538,8 @@ fun! s:Choose(patterns, string, comma, branch, prefix, 
suffix, ...)
   else
     let currpat = substitute(current, s:notslash .. a:branch, '\|', 'g')
   endif
+  " un-escape \, to ,
+  let currpat = substitute(currpat, '\,', ',', 'g')
   while a:string !~ a:prefix .. currpat .. a:suffix
     let tail = strpart(tail, i)
     let i = matchend(tail, s:notslash .. a:comma)
diff --git a/runtime/pack/dist/opt/matchit/doc/matchit.txt 
b/runtime/pack/dist/opt/matchit/doc/matchit.txt
index d072d59ae..ba748540b 100644
--- a/runtime/pack/dist/opt/matchit/doc/matchit.txt
+++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt
@@ -4,7 +4,7 @@ For instructions on installing this file, type
        `:help matchit-install`
 inside Vim.
 
-For Vim version 9.0.  Last change:  2023 June 28
+For Vim version 9.1.  Last change:  2024 May 20
 
 
                  VIM REFERENCE MANUAL    by Benji Fisher et al
@@ -174,8 +174,8 @@ defined automatically.
 
 2.1 Temporarily disable the matchit plugin     *matchit-disable* 
*:MatchDisable*
 
-To temporarily reset the plugins, that are setup you can run the following
-command: >
+To temporarily disable the matchit plugin, after it hat been loaded,
+execute this command: >
        :MatchDisable
 
 This will delete all the defined key mappings to the Vim default.
diff --git a/runtime/pack/dist/opt/matchit/doc/tags 
b/runtime/pack/dist/opt/matchit/doc/tags
index 4ccdc8721..e684fb116 100644
--- a/runtime/pack/dist/opt/matchit/doc/tags
+++ b/runtime/pack/dist/opt/matchit/doc/tags
@@ -1,4 +1,6 @@
 :MatchDebug    matchit.txt     /*:MatchDebug*
+:MatchDisable  matchit.txt     /*:MatchDisable*
+:MatchEnable   matchit.txt     /*:MatchEnable*
 MatchError     matchit.txt     /*MatchError*
 [%     matchit.txt     /*[%*
 ]%     matchit.txt     /*]%*
@@ -26,6 +28,7 @@ matchit-choose        matchit.txt     /*matchit-choose*
 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*
diff --git a/runtime/pack/dist/opt/matchit/plugin/matchit.vim 
b/runtime/pack/dist/opt/matchit/plugin/matchit.vim
index d6c735d7b..08fee0964 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.19
-"  Last Change: 2023, June 28th
+"  Version:     1.20
+"  Last Change: 2024 May 20
 "  Repository:  https://github.com/chrisbra/matchit
 "  Previous URL:http://www.vim.org/script.php?script_id=39
 "  Previous Maintainer:  Benji Fisher PhD   <be...@member.ams.org>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1s97XL-00DiQI-0g%40256bit.org.

Reply via email to