Skip to content
Browse files

修正 matchit 有时仅第一次有效的 bug

这种情况仅在定义了 b:match_words 且并未定义 b:match_debug 时发生
  • Loading branch information...
1 parent 58ccb0d commit 8f4237e7cbc0f3e3f15a6e03300604536032e065 @lilydjwg committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/matchit.vim
View
2 plugin/matchit.vim
@@ -122,7 +122,6 @@ function! s:Match_wrapper(word, forward, mode) range
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
if (match_words != s:last_words) || (&mps != s:last_mps) ||
\ exists("b:match_debug")
- let s:last_words = match_words
let s:last_mps = &mps
" The next several lines were here before
" BF started messing with this script.
@@ -134,6 +133,7 @@ function! s:Match_wrapper(word, forward, mode) range
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
+ let s:last_words = match_words
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words

0 comments on commit 8f4237e

Please sign in to comment.
Something went wrong with that request. Please try again.