summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/plugin/matchparen.vim
AgeCommit message (Collapse)AuthorFiles
2025-04-10vim-patch:9.1.1289: tests: no test for matchparen plugin with WinScrolled ↵zeertzjq1
event (#33411) Problem: tests: no test for matchparen plugin with WinScrolled event Solution: add missing test closes: vim/vim#10942 https://github.com/vim/vim/commit/96a0b2a6d5107580398435e263bd529d4ba3df49 Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-03-15vim-patch:9.1.1203: matchparen keeps cursor on case label in sh filetype ↵zeertzjq1
(#32900) Problem: matchparen keeps cursor on case label in sh filetype (@categorical, after 9.1.1187). Solution: Use :defer so that cursor is always restored, remove checks for older Vims, finish early if Vim does not support :defer fixes: vim/vim#16887 closes: vim/vim#16888 https://github.com/vim/vim/commit/47071c6076018cace96f6e567054a21c123d0c10
2025-03-09vim-patch:9.1.1187: matchparen plugin wrong highlights shell case statement ↵zeertzjq1
(#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>
2025-01-04fix(runtime): let matchit and matchparen skips fallback on treesitter capturesEmilia Simmons1
When treesitter is enabled, by default syntax groups are not defined, but these groups are used to identify where to skip matches in matchit and matchparen. This patch does three things: 1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`): Use original implementation. 2. If treesitter is enabled and syntax is not: Match the syntax groups (i.e. `comment\|string`) against treesitter captures to check for skipped groups. 3. Add an explicit treesitter syntax for marking captures to skip: matchit uses `b:match_skip` to determine what counts as skippable Where 's:comment\|string' uses a match of the named syntax groups against a regex match of comment\|string, 't:comment\|string' now uses vim regex to match against the names of the treesitter capture groups.
2024-11-05vim-patch:59834ba: runtime(matchparen): Add matchparen_disable_cursor_hl ↵Christian Clason1
config option Set the "matchparen_disable_cursor_hl" config variable to disable highlighting the cursor with the MatchParen highlighting group. closes: vim/vim#15984 https://github.com/vim/vim/commit/59834ba6df10dc48565bf55ac6c8e8a4aa40210b Co-authored-by: Matteo Landi <matteo@matteolandi.net>
2024-08-25vim-patch:9.1.0694: matchparen is slow on a long line (#30134)zeertzjq1
Problem: The matchparen plugin is slow on a long line. Solution: Don't use a regexp to get char at and before cursor. (zeertzjq) Example: ```vim call setline(1, repeat(' foobar', 100000)) runtime plugin/matchparen.vim normal! $hhhhhhhh ``` closes: vim/vim#15568 https://github.com/vim/vim/commit/81e7513c86459c40676bd983f73c2722096d67a9
2024-05-18vim-patch:94043780196c (#28831)zeertzjq1
runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797) fixes: neovim/neovim#28828 https://github.com/vim/vim/commit/94043780196cc66d23eeec10e2c722c6552324e0
2024-03-12vim-patch:9.1.0167: Changing buffer in another window causes it to show ↵zeertzjq1
matchparen (#27820) Problem: Changing buffer in another window using win_execute() causes it to show matchparen (after 9.0.0969). Solution: Delay highlighting with SafeState in BufWinEnter. (zeertzjq) closes: vim/vim#14177 https://github.com/vim/vim/commit/49ffb6b428e1e053446ec0209558a8f9d0963ae7
2023-11-13vim-patch:9.0.2102: matchparen highlight not cleared in completion mode (#26019)zeertzjq1
Problem: matchparen highlight not cleared in completion mode Solution: Clear matchparen highlighting in completion mode Remove hard-coded hack in insexpand.c to clear the :3match before displaying the completion menu. Add a test for matchparen highlighting. While at it, move all test tests related to the matchparen plugin into a separate test file. closes: vim/vim#13493 closes: vim/vim#13524 https://github.com/vim/vim/commit/9588666360e94de3ff58d4bc79aa9148fbf5fc44 Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-10-21vim-patch:d3e277f279ed (#25734)zeertzjq1
matchparen: do not use hard-coded match id (vim/vim#13393) * matchparen: do not use hard-coded match id Instead of using the hard-coded match id 3, which may also be used by other plugins, let the matchparen plugin use whatever ids are automatically returned when calling matchaddpos(). For backwards-compatibility, keep the `:3match` call, which will still use the hard-coded id 3 (as mentioned in :h :3match). closes: vim/vim#13381 https://github.com/vim/vim/commit/d3e277f279ed628809eb6857ea3ebcfca566ca2a Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-13vim-patch:e978b4534a5e (#24697)Sean Dewar1
Farewell to Bram and dedicate upcoming Vim 9.1 to him (vim/vim#12749) https://github.com/vim/vim/commit/e978b4534a5e10471108259118c0ef791106fd92 Also update the header for the following files that were converted to Vim9 script upstream: - autoload/ccomplete.lua (vim9jitted) - ftplugin.vim - ftplugof.vim - indent.vim - indent/vim.vim - makemenu.vim This also updates the "Last Change" dates, even if some changes (due to rewrites to Vim9 script) were not ported. There's still a few other places where Bram is still mentioned as a maintainer in the files we and Vim have: - ftplugin/bash.vim - indent/bash.vim - indent/html.vim - indent/mail.vim - macros/accents.vim - macros/editexisting.vim - syntax/bash.vim - syntax/shared/typescriptcommon.vim - syntax/tar.vim - syntax/typescript.vim - syntax/typescriptreact.vim - syntax/zimbu.vim Maybe future patches will address that. Also exclude changes to .po files that didn't apply automatically (the `:messages` maintainer string isn't used in Nvim anyway). Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-02-28vim-patch:partial:dd60c365cd26 (#22437)Christian Clason1
vim-patch:partial:dd60c365cd26 Update runtime files https://github.com/vim/vim/commit/dd60c365cd2630794be84d63c4fe287124a30b97 Co-authored-by: Bram Moolenaar <Bram@vim.org> Skip: eval.txt, repeat.txt (needs `getscriptinfo()`)
2022-12-08vim-patch:86b4816766d9 (#21314)Christian Clason1
Update runtime files https://github.com/vim/vim/commit/86b4816766d976a7ecd4403eca1f8bf6b4105800 vim-patch:9.0.1029: autoload directory missing from distribution Problem: Autoload directory missing from distribution. Solution: Add the autoload/zig directory to the list of distributed files. https://github.com/vim/vim/commit/84dbf855fb2d883481f74ad0ccf3df3f8837e6bf Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-29vim-patch:9.0.0969: matchparen highlight is not updated when switching ↵zeertzjq1
buffers (#21227) Problem: Matchparen highlight is not updated when switching buffers. Solution: Listen to the BufLeave and the BufWinEnter autocmd events. (closes vim/vim#11626) https://github.com/vim/vim/commit/28a896f54d4b2f2b4bef8ef4144dde1673c9d6e7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-08-25vim-patch:fd999452adaf (#19929)Christian Clason1
Update runtime files https://github.com/vim/vim/commit/fd999452adaf529a30d78844b5fbee355943da29
2021-05-02vim-patch:56994d215815Jan Edmund Lazo1
Update runtime files. https://github.com/vim/vim/commit/56994d215815139207f3c5ce02a1720e44e93c09
2021-05-02vim-patch:130cbfc31235Jan Edmund Lazo1
Update runtime files https://github.com/vim/vim/commit/130cbfc31235c6cb52ffe718ea0a5bb50fbbc9fd
2021-04-28vim-patch:73fef33014dbJan Edmund Lazo1
Update runtime files https://github.com/vim/vim/commit/73fef33014dbf21fc59e7e47fb091117868d82fb Omit usr_46.txt.
2021-04-27vim-patch:1ff14ba24c4dJan Edmund Lazo1
Update runtime files. https://github.com/vim/vim/commit/1ff14ba24c4d85c008d7abe5e140dbb497ffea8d
2018-11-13vim-patch:8.1.0143: matchit and matchparen don't handle E363Jan Edmund Lazo1
Problem: Matchit and matchparen don't handle E363. Solution: Catch the E363 error. (Christian Brabandt) https://github.com/vim/vim/commit/3d1d6475f9665660c80cc53a7da2d5450b8b8d08
2018-11-13vim-patch:8.1.0115: the matchparen plugin may throw an errorJan Edmund Lazo1
Problem: The matchparen plugin may throw an error. Solution: Change the skip argument from zero to "0". https://github.com/vim/vim/commit/b7a5ab112ab2267c54acdb6a326642afcd797bc4
2018-10-29vim-patch:6dc819b1299eJustin M. Keyes1
Updated runtime and language files. https://github.com/vim/vim/commit/6dc819b1299e1d9f99303568772ade544d5c1322
2017-11-07vim-patch:01164a6546b4Justin M. Keyes1
Long overdue runtime update. https://github.com/vim/vim/commit/01164a6546b4c635daf96a1f17d1cb2d07f32a66
2016-06-07vim-patch:e0fa374James McCoy1
Updated runtime files. https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d Ignore changes to * doc/channel.txt: Channel related docs * doc/netbeans.txt, doc/os_dos.txt, doc/todo.txt: Not relevant to Neovim * doc/tags: Generated at build time
2016-06-07vim-patch:38a5563James McCoy1
Update runtime files. https://github.com/vim/vim/commit/38a55639d603823efcf2d2fdf542dbffdeb60b75 Ignore changes to * doc/channel.txt, doc/eval.txt, doc/various.txt: Channel related docs * doc/tags: Generated at build time * doc/todo.txt, doc/vi_diff.txt: Not relevant to neovim
2016-05-06vim-patch:7.4.1015James McCoy1
Problem: The column is not restored properly when the matchparen plugin is used in Insert mode and the cursor is after the end of the line. Solution: Set the curswant flag. (Christian Brabandt). Also fix highlighting the match of the character before the cursor. https://github.com/vim/vim/commit/c21d67e33c1b42a492e04788cbb14a23a6724e39
2016-05-03vim-patch:256972aKillTheMule1
Updated runtime files. https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b Missing files in runtime/doc: todo.txt, tags. Patch to runtime/doc/syntax.txt was applied manually in part, for no discernible reason.
2015-01-12Revert "[WIP] "abstract_ui" fixes and improvements"Justin M. Keyes1
2015-01-12runtime: Fix plugin/matchparen.vim for abstract_uiThiago de Arruda1
2014-10-09vim-patch:7.4.397Scott Prager1
Problem: Matchparen only uses the topmost syntax item. Solution: Go through the syntax stack to find items. (James McCoy) Also use getcurpos() when possible. https://code.google.com/p/vim/source/detail?r=v7-4-397
2014-07-29re-integrate runtime/ vim-patch:0 #938Justin M. Keyes1
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7 Excluding: Amiga icons (*.info, icons/) doc/hangulin.txt tutor/ spell/ lang/ (only used for menu translations) macros/maze/, macros/hanoi/, macros/life/, macros/urm/ These were used to test vi compatibility. termcap "Demonstration of a termcap file (for the Amiga and Archimedes)" Helped-by: Rich Wareham <rjw57@cam.ac.uk> Helped-by: John <john.schmidt.h@gmail.com> Helped-by: Yann <yann@yann-salaun.com> Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com> Helped-by: drasill <github@tof2k.com> Helped-by: Tae Sandoval Murgan <taecilla@gmail.com> Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>