feat(options): add 'eventignorewin' (#32152)

vim-patch:partial: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.

b7147f8236

vim-patch:9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename

Problem:  tests: Test_WinScrolled_Resized_eiw() uses wrong filename
          (Luuk van Baal, after v9.1.1084)
Solution: Rename the filename to something more unique

bfc7719e48
This commit is contained in:
luukvbaal
2025-02-12 11:01:06 +01:00
committed by GitHub
parent 6982106f8c
commit 82a215cb2d
19 changed files with 406 additions and 259 deletions

View File

@@ -2627,6 +2627,23 @@ local options = {
type = 'string',
varname = 'p_ei',
},
{
abbreviation = 'eiw',
cb = 'did_set_eventignore',
defaults = '',
deny_duplicates = true,
desc = [=[
Similar to 'eventignore' but applies to a particular window and its
buffers, for which window and buffer related autocommands can be
ignored indefinitely without affecting the global 'eventignore'.
]=],
expand_cb = 'expand_set_eventignore',
full_name = 'eventignorewin',
list = 'onecomma',
scope = { 'win' },
short_desc = N_('autocommand events that are ignored in a window'),
type = 'string',
},
{
abbreviation = 'et',
defaults = false,