aboutsummaryrefslogtreecommitdiff
path: root/scripts/vim-patch.sh
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-08-19 07:47:24 +0800
committerGitHub <noreply@github.com>2026-08-19 07:47:24 +0800
commit53211ade2baba5841050daa50b1c38fedaffdda0 (patch)
tree69d3030784fbaccc285d3704575d11808e3c2804 /scripts/vim-patch.sh
parentb524338261841e1e1f15a3e9cb3b644fd66ec0b8 (diff)
downloadrneovim-53211ade2baba5841050daa50b1c38fedaffdda0.tar.gz
rneovim-53211ade2baba5841050daa50b1c38fedaffdda0.tar.bz2
rneovim-53211ade2baba5841050daa50b1c38fedaffdda0.zip
vim-patch:9.2.0969: runtime(shaderslang): matchit % breaks on braces (#41371)
Problem: b:match_words groups "{" with the if/for/while/switch keywords and "}" with "break" which breaks % matching on braces Solution: Drop the brace and bracket groups, matchit appends 'matchpairs' by itself (Matthias Bruns). matchit counts every alternative in a group instead of pairing the alternatives with each other. Listing `{` alongside the if, for, while, switch, struct and class keywords therefore makes a line such as `for (...) {` count as two openers, and listing `break` alongside `}` lets a brace pair with a break statement. As a result % on the opening brace of a function does not move at all, and % on `switch (x) {` jumps to `break;` instead of the closing brace. Braces and brackets do not need to be listed: matchit appends 'matchpairs' to b:match_words by itself. Drop them and leave the preprocessor group unchanged. closes: vim/vim#21064 https://github.com/vim/vim/commit/08c74ce09a9269b93b01ff2289683ad63f396fba Co-authored-by: Matthias Bruns <matthiasbruns35@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'scripts/vim-patch.sh')
0 files changed, 0 insertions, 0 deletions