vim/runtime
Christian Brabandt 9102ac11ab
patch 9.1.1187: matchparen plugin wrong highlights shell case statement
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>
2025-03-09 08:40:33 +01:00
..
autoload runtime(man): don't add jumps when loading a manpage 2025-03-05 20:38:20 +01:00
bitmaps
colors runtime(colors): Update colorschemes, include new unokai colorscheme 2025-01-14 17:15:59 +01:00
compiler runtime(compiler): improve svelte-check 2025-02-27 19:09:52 +01:00
doc runtime(doc): use GNOME instead of Gnome 2025-03-09 08:38:35 +01:00
ftplugin runtime(go): add 'keywordprg' and 'formatprg' to ftplugin 2025-03-07 19:19:31 +01:00
icons
import/dist
indent patch 9.1.1140: filetype: m17ndb files are not detected 2025-02-23 09:41:42 +01:00
keymap runtime(keymap): Add ukrainian-enhanced keymap 2025-02-15 09:59:57 +01:00
lang translation(fi): Fix typoes in Finish menu translation 2024-12-25 10:28:29 +01:00
macros
pack/dist/opt runtime(nohlsearch): fix CursorHold loop 2025-03-08 17:16:18 +01:00
plugin patch 9.1.1187: matchparen plugin wrong highlights shell case statement 2025-03-09 08:40:33 +01:00
print
spell
syntax runtime(syntax-tests): Improve parts of "runtest.vim" 2025-03-08 16:58:17 +01:00
tools
tutor runtime(new-tutor): add chapter two to the interactive tutorial 2025-03-05 21:49:37 +01:00
bugreport.vim
defaults.vim patch 9.1.0899: default for 'backspace' can be set in C code 2024-12-01 16:25:53 +01:00
delmenu.vim
doc.info
evim.vim
filetype.vim patch 9.1.1186: filetype: help files in git repos are not detected 2025-03-08 17:21:16 +01:00
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 patch 9.1.1182: No cmdline completion for 'completefuzzycollect' 2025-03-07 19:09:09 +01:00
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