1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-27 04:05:11 +01:00
Commit graph

53 commits

Author SHA1 Message Date
zeertzjq
47071c6076
patch 9.1.1203: matchparen keeps cursor on case label in sh filetype
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: 
closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:43:07 +01:00
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: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 08:40:33 +01:00
Matteo Landi
59834ba6df
runtime(matchparen): Add matchparen_disable_cursor_hl config option
Set the "matchparen_disable_cursor_hl" config variable to disable
highlighting the cursor with the MatchParen highlighting group.

closes: 

Signed-off-by: Matteo Landi <matteo@matteolandi.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 20:46:54 +01:00
zeertzjq
81e7513c86
patch 9.1.0694: matchparen is slow on a long line
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: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-24 16:32:24 +02:00
zeertzjq
9404378019
runtime(matchparen): fix :NoMatchParen not working ()
fixes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-18 08:55:49 +02:00
zeertzjq
49ffb6b428
patch 9.1.0167: Changing buffer in another window causes it to show matchparen
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: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 21:38:58 +01:00
Christian Brabandt
9588666360
patch 9.0.2102: matchparen highlight not cleared in completion mode
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: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:55:01 +01:00
Christian Brabandt
d3e277f279
matchparen: do not use hard-coded match id ()
* 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: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-21 11:06:50 +02:00
Christian Brabandt
e978b4534a
Farewell to Bram and dedicate upcoming Vim 9.1 to him ()
* Dedicate upcoming Vim 9.1 to Bram

Also replace in a few more places Brams email address and mention new
maintainers.

* Remove Bram from any Maintainer role

* runtime: Align Header

* it's mailing list not mailinglist
2023-08-13 10:33:05 +02:00
Bram Moolenaar
dd60c365cd Update runtime files 2023-02-27 15:49:53 +00:00
Bram Moolenaar
86b4816766 Update runtime files 2022-12-06 18:20:10 +00:00
Bram Moolenaar
28a896f54d patch 9.0.0969: matchparen highlight is not updated when switching buffers
Problem:    Matchparen highlight is not updated when switching buffers.
Solution:   Listen to the BufLeave and the BufWinEnter autocmd events.
            (closes )
2022-11-28 22:21:12 +00:00
Bram Moolenaar
fd999452ad Update runtime files 2022-08-24 18:30:14 +01:00
Bram Moolenaar
56994d2158 Update runtime files. 2021-04-17 16:31:09 +02:00
Bram Moolenaar
130cbfc312 Update runtime files 2021-04-07 21:07:20 +02:00
Bram Moolenaar
73fef33014 Update runtime files 2020-06-21 22:12:03 +02:00
Bram Moolenaar
1ff14ba24c Update runtime files. 2019-11-02 14:09:23 +01:00
Bram Moolenaar
3d1d6475f9 patch 8.1.0143: matchit and matchparen don't handle E363
Problem:    Matchit and matchparen don't handle E363.
Solution:   Catch the E363 error. (Christian Brabandt)
2018-07-03 18:18:23 +02:00
Bram Moolenaar
6dc819b129 Updated runtime and language files. 2018-07-03 16:42:19 +02:00
Bram Moolenaar
b7a5ab112a patch 8.1.0115: the matchparen plugin may throw an error
Problem:    The matchparen plugin may throw an error.
Solution:   Change the skip argument from zero to "0".
2018-06-25 00:05:59 +02:00
Bram Moolenaar
01164a6546 Long overdue runtime update. 2017-11-02 22:58:42 +01:00
Bram Moolenaar
e0fa3742ea Updated runtime files. 2016-02-20 15:47:01 +01:00
Bram Moolenaar
38a55639d6 Update runtime files. 2016-02-15 22:07:32 +01:00
Bram Moolenaar
c21d67e33c patch 7.4.1015
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.
2015-12-31 22:27:55 +01:00
Bram Moolenaar
256972a984 Updated runtime files. 2015-12-29 19:10:25 +01:00
Bram Moolenaar
e98cfe1cc9 updated for version 7.4.397
Problem:    Matchparen only uses the topmost syntax item.
Solution:   Go through the syntax stack to find items. (James McCoy)
            Also use getcurpos() when possible.
2014-08-06 19:09:16 +02:00
Bram Moolenaar
07d87790f1 Update runtime files. Make matchparen plugin backwards compatible.
Add json filetype.
2014-07-19 14:04:47 +02:00
Bram Moolenaar
db6ea06335 Updated runtime files. 2014-07-10 22:01:47 +02:00
Bram Moolenaar
b3414595c7 updated for version 7.4.330
Problem:    Using a regexp pattern to highlight a specific position can be
            slow.
Solution:   Add matchaddpos() to highlight specific positions efficiently.
            (Alexey Radkov)
2014-06-17 17:48:32 +02:00
Bram Moolenaar
ad3b366c82 Update runtime files. 2013-05-17 18:14:19 +02:00
Bram Moolenaar
84a05acc8c updated for version 7.3.925
Problem:    Typos in source files.
Solution:   Fix the typos. (Ken Takata)
2013-05-06 04:24:17 +02:00
Bram Moolenaar
71afbfe6cd updated for version 7.3.872
Problem:    On some systems case of file names is always ignored, on others
            never.
Solution:   Add the 'fileignorecase' option to control this at runtime.
            Implies 'wildignorecase'.
2013-03-19 16:49:16 +01:00
Bram Moolenaar
186628f671 updated for version 7.3.867
Problem:    Matchparen does not update match when using auto-indenting.
            (Marc Aldorasi)
Solution:   Add the TextChanged and TextChangedI autocommand events.
2013-03-19 13:33:23 +01:00
Bram Moolenaar
5302d9ebc1 Updated runtime files. 2011-09-14 17:55:08 +02:00
Bram Moolenaar
81af9250a7 Update runtime files. 2010-12-10 20:35:50 +01:00
Bram Moolenaar
5c73622a90 Update runtime files. 2010-01-06 20:54:52 +01:00
Bram Moolenaar
f2b2e70b3b updated for version 7.1-269 2008-03-09 15:45:53 +00:00
Bram Moolenaar
76929293e0 updated for version 7.1-211 2008-01-06 19:07:36 +00:00
Bram Moolenaar
fa2e044471 updated for version 7.1-082 2007-08-18 16:21:50 +00:00
Bram Moolenaar
ef04586d9f updated for version 7.1-048 2007-08-02 21:00:50 +00:00
Bram Moolenaar
8bc7847e20 updated for version 7.1a 2007-05-06 12:26:25 +00:00
Bram Moolenaar
41e6cd5f2a updated for version 7.0-093 2006-09-09 11:37:51 +00:00
Bram Moolenaar
8ff38007cb updated for version 7.0-046 2006-08-08 16:07:03 +00:00
Bram Moolenaar
2347f062fb updated for version 7.0-012 2006-05-13 12:48:30 +00:00
Bram Moolenaar
25e2c9e3e6 updated for version 7.0f03 2006-04-27 21:40:34 +00:00
Bram Moolenaar
910f66f90c updated for version 7.0c10 2006-04-05 20:41:53 +00:00
Bram Moolenaar
e2f98b95c8 updated for version 7.0c03 2006-03-29 21:18:24 +00:00
Bram Moolenaar
3b1ddfed51 updated for version 7.0224 2006-03-14 22:55:34 +00:00
Bram Moolenaar
36fc535cb1 updated for version 7.0214 2006-03-04 21:49:37 +00:00
Bram Moolenaar
bfb2d40b6e updated for version 7.0213 2006-03-03 22:50:42 +00:00