aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/func/_memoize.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-09 16:57:08 +0800
committerGitHub <noreply@github.com>2025-03-09 16:57:08 +0800
commitd414d0e8eab8906db19e2f83b9983ce8727f8de6 (patch)
tree60ec82271ba46ac183b3098dfaf24b7e5ce2a6cb /runtime/lua/vim/func/_memoize.lua
parent2a53ccdb42a1878a246d8ceca48ef50163931198 (diff)
downloadrneovim-d414d0e8eab8906db19e2f83b9983ce8727f8de6.tar.gz
rneovim-d414d0e8eab8906db19e2f83b9983ce8727f8de6.tar.bz2
rneovim-d414d0e8eab8906db19e2f83b9983ce8727f8de6.zip
vim-patch:9.1.1187: matchparen plugin wrong highlights shell case statement (#32798)
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: vim/vim#16801 closes: vim/vim#16831 https://github.com/vim/vim/commit/9102ac11ab3938ec8c15bfebd00d2f91d3f1cd6c Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/lua/vim/func/_memoize.lua')
0 files changed, 0 insertions, 0 deletions