runtime(matchit): include minor improvement from chrisbra/matchit

Commit: 
https://github.com/vim/vim/commit/ec46b9d4f2f5a5b36438215aae46c197688d86ac
Author: Jon Parise <[email protected]>
Date:   Tue Jan 13 19:40:40 2026 +0000

    runtime(matchit): include minor improvement from chrisbra/matchit
    
    In particular, documentation update from
    related: chrisbra/matchithttps://github.com/vim/vim/issues/55
    
    Signed-off-by: Jon Parise <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/pack/dist/opt/matchit/autoload/matchit.vim 
b/runtime/pack/dist/opt/matchit/autoload/matchit.vim
index 904c2cce1..1e660ffd3 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 06, 2025
+"  Last Change: Jan 09, 2026
 
 " Neovim does not support scriptversion
 if has("vimscript-4")
@@ -71,9 +71,8 @@ function matchit#Match_wrapper(word, forward, mode) range
 
   " Check for custom match function hook
   if exists("b:match_function")
-    let MatchFunc = b:match_function
     try
-      let result = call(MatchFunc, [a:forward])
+      let result = call(b:match_function, [a:forward])
       if !empty(result)
         call cursor(result)
         return s:CleanUp(restore_options, a:mode, startpos)
diff --git a/runtime/pack/dist/opt/matchit/doc/matchit.txt 
b/runtime/pack/dist/opt/matchit/doc/matchit.txt
index 0d505f855..e82bacdeb 100644
--- a/runtime/pack/dist/opt/matchit/doc/matchit.txt
+++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt
@@ -282,8 +282,8 @@ Python example (simplified): >
          let pattern = get(s:keywords, keyword, '')
          if empty(pattern) | return [] | endif
 
-         let flags = a:forward ? 'nW' : 'nbW'
-         let [lnum, col] = searchpos('^\s*\%(' . pattern . '\)\>', flags, 0, 0,
+         " Forward-only. Backwards left as an exercise for the reader.
+         let [lnum, col] = searchpos('^\s*\%(' . pattern . '\)\>', 'nW' 0, 0,
          \                            'indent(".") != ' . indent('.'))
          return lnum > 0 ? [lnum, col] : []
        endfunction

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vfkKA-00BOBL-Hy%40256bit.org.

Raspunde prin e-mail lui