To: vim-dev@vim.org Subject: Patch 6.2.326 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.326 Problem: ":windo set syntax=foo" doesn't work. (Tim Chase) Solution: Don't change 'eventignore' for ":windo". Files: src/ex_cmds2.c *** ../vim-6.2.325/src/ex_cmds2.c Sun Feb 29 21:06:13 2004 --- src/ex_cmds2.c Sun Mar 7 19:30:37 2004 *************** *** 1581,1587 **** buf_T *buf; int next_fnum = 0; #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) ! char_u *save_ei = vim_strsave(p_ei); char_u *new_ei; #endif --- 1581,1587 ---- buf_T *buf; int next_fnum = 0; #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) ! char_u *save_ei = NULL; char_u *new_ei; #endif *************** *** 1594,1605 **** #endif #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) ! 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); } #endif --- 1594,1615 ---- #endif #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); ! } ! } } #endif *************** *** 1692,1704 **** } #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) ! if (new_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); #endif } --- 1702,1714 ---- } #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); } #endif } *** ../vim-6.2.325/src/version.c Sun Mar 7 19:33:37 2004 --- src/version.c Sun Mar 7 19:31:07 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 326, /**/ -- "I love deadlines. I especially like the whooshing sound they make as they go flying by." -- Douglas Adams /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///