diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-01-21 11:55:25 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-01-21 11:55:25 +0000 |
commit | dcaf10e19aac2af7c93d6dd23cb6241f971f2b19 (patch) | |
tree | d704aec40840d64d81fbf7225fcd5dd64eab847f /src/ex_cmds2.c | |
parent | ca4729948bdc79d2175607194fdd98df7d6eb529 (diff) |
updated for version 7.0043
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 2600a1b245..8ba1744d00 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1618,7 +1618,6 @@ ex_listdo(eap) int next_fnum = 0; #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) char_u *save_ei = NULL; - char_u *new_ei; #endif char_u *p_shm_save; @@ -1632,22 +1631,9 @@ ex_listdo(eap) #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) if (eap->cmdidx != CMD_windo) - { - /* Add "Syntax" to 'eventignore' to skip loading syntax highlighting - * for every buffer loaded into the window. A considerable speed - * improvement. */ - save_ei = vim_strsave(p_ei); - if (save_ei != NULL) - { - new_ei = vim_strnsave(p_ei, (int)STRLEN(p_ei) + 8); - if (new_ei != NULL) - { - STRCAT(new_ei, ",Syntax"); - set_string_option_direct((char_u *)"ei", -1, new_ei, OPT_FREE); - vim_free(new_ei); - } - } - } + /* Don't do syntax HL autocommands. Skipping the syntax file is a + * great speed improvement. */ + save_ei = au_event_disable(",Syntax"); #endif if (eap->cmdidx == CMD_windo @@ -1755,13 +1741,7 @@ ex_listdo(eap) } #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) - if (save_ei != NULL) - { - set_string_option_direct((char_u *)"ei", -1, save_ei, OPT_FREE); - apply_autocmds(EVENT_SYNTAX, curbuf->b_p_syn, - curbuf->b_fname, TRUE, curbuf); - vim_free(save_ei); - } + au_event_restore(save_ei); #endif } |