patch 9.1.1084: Unable to persistently ignore events in a window and its buffers
Problem: Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
(Luuk van Baal)
Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.
closes: #16530
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a35040f795
commit
b7147f8236
@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.1. Last change: 2024 Dec 04
|
||||
*autocmd.txt* For Vim version 9.1. Last change: 2025 Feb 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1992,6 +1992,9 @@ To disable autocommands for some time use the 'eventignore' option. Note that
|
||||
this may cause unexpected behavior, make sure you restore 'eventignore'
|
||||
afterwards, using a |:try| block with |:finally|.
|
||||
|
||||
To disable autocmds indefinitely in a specific window use the 'eventignorewin'
|
||||
option. This can only be used to ignore window and buffer related events.
|
||||
|
||||
*:noautocmd* *:noa*
|
||||
To disable autocommands for just one command use the ":noautocmd" command
|
||||
modifier. This will set 'eventignore' to "all" for the duration of the
|
||||
|
||||
Reference in New Issue
Block a user