Mercurial > vim
diff runtime/pack/dist/opt/matchit/autoload/matchit.vim @ 32709:ea044451c98f
update matchit (#12611)
Commit: https://github.com/vim/vim/commit/bd76c89e31ac9d9efd00ec8dda9c32436415dbbb
Author: Christian Brabandt <cb@256bit.org>
Date: Wed Aug 9 17:39:53 2023 +0200
update matchit (https://github.com/vim/vim/issues/12611)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 09 Aug 2023 17:45:05 +0200 |
parents | 5825405e4e2c |
children | 925475d6ebae |
line wrap: on
line diff
--- 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: Jun 10, 2021 +" Last Change: Jan 24, 2022 " Neovim does not support scriptversion if has("vimscript-4") @@ -42,6 +42,10 @@ function s:RestoreOptions() let restore_options = " ve=" .. &ve .. restore_options set ve= endif + if &smartcase + let restore_options = " smartcase " .. restore_options + set nosmartcase + endif return restore_options endfunction @@ -134,9 +138,6 @@ function matchit#Match_wrapper(word, for let curcol = match(matchline, regexp) " If there is no match, give up. if curcol == -1 - " Make sure macros abort properly - "exe "norm! \<esc>" - call feedkeys("\e", 'tni') return s:CleanUp(restore_options, a:mode, startpos) endif let endcol = matchend(matchline, regexp) @@ -756,15 +757,15 @@ endfun fun! s:ParseSkip(str) let skip = a:str if skip[1] == ":" - if skip[0] == "s" + if skip[0] ==# "s" let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .. \ strpart(skip,2) .. "'" - elseif skip[0] == "S" + elseif skip[0] ==# "S" let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .. \ strpart(skip,2) .. "'" - elseif skip[0] == "r" + elseif skip[0] ==# "r" let skip = "strpart(getline('.'),0,col('.'))=~'" .. strpart(skip,2) .. "'" - elseif skip[0] == "R" + elseif skip[0] ==# "R" let skip = "strpart(getline('.'),0,col('.'))!~'" .. strpart(skip,2) .. "'" endif endif