mirror of
https://github.com/vim/vim
synced 2025-03-15 22:37:52 +01:00
Problem: matchparen plugin wrong highlights shell case statement (Swudu Susuwu) Solution: return early, if we are in a shSnglCase syntax element The shell syntax element "case $var in foobar)" uses closing parenthesis but there is no corresponding opening parenthesis for that syntax element. However matchparen is not aware of such things and will happily try to match just the next opening parenthesis. So let's just add a way to opt out for such cases. In this case, use the syntax state to check if the closing parenthesis belongs to the syntax item "shSnglCase" and if it is, do not try to find a corresponding opening parenthesis. Since inspecting the syntax state might be expensive, put the whole check behind a filetype test, so that matchparen will only perform this particular check, when it knows the current buffer is a "sh" filetype. fixes: #16801 closes: #16831 Signed-off-by: Christian Brabandt <cb@256bit.org> |
||
---|---|---|
.. | ||
autoload | ||
bitmaps | ||
colors | ||
compiler | ||
doc | ||
ftplugin | ||
icons | ||
import/dist | ||
indent | ||
keymap | ||
lang | ||
macros | ||
pack/dist/opt | ||
plugin | ||
spell | ||
syntax | ||
tools | ||
tutor | ||
bugreport.vim | ||
defaults.vim | ||
delmenu.vim | ||
doc.info | ||
evim.vim | ||
filetype.vim | ||
ftoff.vim | ||
ftplugin.vim | ||
ftplugof.vim | ||
gvim.desktop | ||
gvimrc_example.vim | ||
hi16-action-make.png | ||
hi22-action-make.png | ||
icons.info | ||
indent.vim | ||
indoff.vim | ||
macmap.vim | ||
macros.info | ||
makemenu.vim | ||
menu.vim | ||
mswin.vim | ||
optwin.vim | ||
scripts.vim | ||
synmenu.vim | ||
termcap | ||
tools.info | ||
tutor.info | ||
vim.desktop | ||
vim16x16.gif | ||
vim16x16.png | ||
vim16x16.xpm | ||
vim32x32.gif | ||
vim32x32.png | ||
vim32x32.xpm | ||
vim48x48.gif | ||
vim48x48.png | ||
vim48x48.xpm | ||
vimlogo.cdr | ||
vimlogo.eps | ||
vimlogo.gif | ||
vimlogo.pdf | ||
vimlogo.svg | ||
vimlogo.xpm | ||
vimrc_example.vim |