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>
diff --git a/src/proto/autocmd.pro b/src/proto/autocmd.pro
index 920987a..ed85603 100644
--- a/src/proto/autocmd.pro
+++ b/src/proto/autocmd.pro
@@ -5,7 +5,8 @@
void autocmd_init(void);
void free_all_autocmds(void);
int is_aucmd_win(win_T *win);
-int check_ei(void);
+int check_ei(char_u *ei);
+int event_ignored(event_T event, char_u *ei);
char_u *au_event_disable(char *what);
void au_event_restore(char_u *old_ei);
void do_autocmd(exarg_T *eap, char_u *arg_in, int forceit);
@@ -40,7 +41,7 @@
char_u *get_augroup_name(expand_T *xp, int idx);
char_u *set_context_in_autocmd(expand_T *xp, char_u *arg, int doautocmd);
char_u *get_event_name(expand_T *xp, int idx);
-char_u *get_event_name_no_group(expand_T *xp, int idx);
+char_u *get_event_name_no_group(expand_T *xp, int idx, int eiw);
int autocmd_supported(char_u *name);
int au_exists(char_u *arg);
void f_autocmd_add(typval_T *argvars, typval_T *rettv);