vim/runtime/plugin
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
..
getscriptPlugin.vim runtime(glvs): fix a few issues 2024-09-26 16:14:08 +02:00
gzip.vim runtime(misc): add support for bzip3 to tar, vimball and gzip plugins 2025-02-28 18:06:14 +01:00
logiPat.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00
manpager.vim runtime(manpager): avoid readonly prompt 2024-07-04 13:39:34 +02:00
matchparen.vim patch 9.1.1187: matchparen plugin wrong highlights shell case statement 2025-03-09 08:40:33 +01:00
netrwPlugin.vim runtime(netrw): correct wrong version check 2025-01-30 11:00:35 +01:00
openPlugin.vim runtime(openPlugin): fix unclosed parenthesis in GetWordUnderCursor() 2025-02-01 10:28:52 +01:00
README.txt Update runtime files. 2018-07-21 05:56:22 +02:00
rrhelper.vim Better implementation of creating the Color Scheme menu. (Juergen Kraemer) 2010-07-17 15:20:30 +02:00
spellfile.vim Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749) 2023-08-13 10:33:05 +02:00
tarPlugin.vim runtime(misc): add support for bzip3 to tar, vimball and gzip plugins 2025-02-28 18:06:14 +01:00
tohtml.vim runtime(tohtml): Update TOhtml to version 9.0v2 (#13050) 2023-09-08 19:20:01 +02:00
tutor.vim patch 9.1.0836: The vimtutor can be improved 2024-11-03 11:01:10 +01:00
vimballPlugin.vim runtime(misc): add support for bzip3 to tar, vimball and gzip plugins 2025-02-28 18:06:14 +01:00
zipPlugin.vim runtime(misc): announce adoption of various runtime files 2024-02-19 20:46:49 +01:00

The plugin directory is for standard Vim plugin scripts.

All files here ending in .vim will be sourced by Vim when it starts up.
Look in the file for hints on how it can be disabled without deleting it.

getscriptPlugin.vim  get latest version of Vim scripts
gzip.vim	     edit compressed files
logiPat.vim	     logical operators on patterns
manpager.vim	     using Vim as manpager
matchparen.vim	     highlight paren matching the one under the cursor
netrwPlugin.vim	     edit files over a network and browse (remote) directories
rrhelper.vim	     used for --remote-wait editing
spellfile.vim	     download a spellfile when it's missing
tarPlugin.vim	     edit (compressed) tar files
tohtml.vim	     convert a file with syntax highlighting to HTML
vimballPlugin.vim    create and unpack .vba files
zipPlugin.vim	     edit zip archives

Note: the explorer.vim plugin is no longer here, the netrw.vim plugin has
taken over browsing directories (also for remote directories).