Describe the bug
syntax is disabled when bufdo
To Reproduce
vim --clean /path/to/vim/src/if_*.c:bufdo tab splitnExpected behavior
All buffers is enabled syntax
As far as I looked code, this is doing intentionally.
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index a275fb8b7..803a98229 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1427,9 +1427,6 @@ ex_listdo(exarg_T *eap) tabpage_T *tp; buf_T *buf = curbuf; int next_fnum = 0; -#if defined(FEAT_SYN_HL) - char_u *save_ei = NULL; -#endif char_u *p_shm_save; #ifdef FEAT_QUICKFIX int qf_size = 0; @@ -1445,12 +1442,6 @@ ex_listdo(exarg_T *eap) } #endif -#if defined(FEAT_SYN_HL) - if (eap->cmdidx != CMD_windo && eap->cmdidx != CMD_tabdo) - /* Don't do syntax HL autocommands. Skipping the syntax file is a - * great speed improvement. */ - save_ei = au_event_disable(",Syntax"); -#endif #ifdef FEAT_CLIPBOARD start_global_changes(); #endif @@ -1638,14 +1629,6 @@ ex_listdo(exarg_T *eap) listcmd_busy = FALSE; } -#if defined(FEAT_SYN_HL) - if (save_ei != NULL) - { - au_event_restore(save_ei); - apply_autocmds(EVENT_SYNTAX, curbuf->b_p_syn, - curbuf->b_fname, TRUE, curbuf); - } -#endif #ifdef FEAT_CLIPBOARD end_global_changes(); #endif
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
argdo also can reproduce.
This is all.
vim --clean /path/to/vim/src/if_*.c
:bufdo tab split
:ball
https://go-gyazo.appspot.com/ad695f8d81690638.png
First and last buffer has syntax. But middles are not.