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
@ -6628,6 +6628,7 @@ get_varp(struct vimoption *p)
|
||||
#ifdef FEAT_DIFF
|
||||
case PV_DIFF: return (char_u *)&(curwin->w_p_diff);
|
||||
#endif
|
||||
case PV_EIW: return (char_u *)&(curwin->w_p_eiw);
|
||||
#ifdef FEAT_FOLDING
|
||||
case PV_FDC: return (char_u *)&(curwin->w_p_fdc);
|
||||
case PV_FEN: return (char_u *)&(curwin->w_p_fen);
|
||||
@ -6941,6 +6942,7 @@ copy_winopt(winopt_T *from, winopt_T *to)
|
||||
to->wo_diff = from->wo_diff;
|
||||
to->wo_diff_saved = from->wo_diff_saved;
|
||||
#endif
|
||||
to->wo_eiw = copy_option_val(from->wo_eiw);
|
||||
#ifdef FEAT_CONCEAL
|
||||
to->wo_cocu = copy_option_val(from->wo_cocu);
|
||||
to->wo_cole = from->wo_cole;
|
||||
@ -7006,6 +7008,7 @@ check_winopt(winopt_T *wop UNUSED)
|
||||
# endif
|
||||
check_string_option(&wop->wo_fmr);
|
||||
#endif
|
||||
check_string_option(&wop->wo_eiw);
|
||||
#ifdef FEAT_SIGNS
|
||||
check_string_option(&wop->wo_scl);
|
||||
#endif
|
||||
@ -7054,6 +7057,7 @@ clear_winopt(winopt_T *wop UNUSED)
|
||||
# endif
|
||||
clear_string_option(&wop->wo_fmr);
|
||||
#endif
|
||||
clear_string_option(&wop->wo_eiw);
|
||||
#ifdef FEAT_SIGNS
|
||||
clear_string_option(&wop->wo_scl);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user