Mercurial > vim
comparison src/fileio.c @ 6608:a5ba0921efcb v7.4.630
updated for version 7.4.630
Problem: When using Insert mode completion combined with autocommands the
redo command may not work.
Solution: Do not save the redo buffer when executing autocommands. (Yasuhiro
Matsumoto)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 17 Feb 2015 10:58:25 +0100 |
parents | 9657929ee562 |
children | a871b5070d59 |
comparison
equal
deleted
inserted
replaced
6607:eaf81729ef02 | 6608:a5ba0921efcb |
---|---|
9228 #endif | 9228 #endif |
9229 static int filechangeshell_busy = FALSE; | 9229 static int filechangeshell_busy = FALSE; |
9230 #ifdef FEAT_PROFILE | 9230 #ifdef FEAT_PROFILE |
9231 proftime_T wait_time; | 9231 proftime_T wait_time; |
9232 #endif | 9232 #endif |
9233 int did_save_redobuff = FALSE; | |
9233 | 9234 |
9234 /* | 9235 /* |
9235 * Quickly return if there are no autocommands for this event or | 9236 * Quickly return if there are no autocommands for this event or |
9236 * autocommands are blocked. | 9237 * autocommands are blocked. |
9237 */ | 9238 */ |
9428 * When starting to execute autocommands, save the search patterns. | 9429 * When starting to execute autocommands, save the search patterns. |
9429 */ | 9430 */ |
9430 if (!autocmd_busy) | 9431 if (!autocmd_busy) |
9431 { | 9432 { |
9432 save_search_patterns(); | 9433 save_search_patterns(); |
9433 saveRedobuff(); | 9434 if (!ins_compl_active()) |
9435 { | |
9436 saveRedobuff(); | |
9437 did_save_redobuff = TRUE; | |
9438 } | |
9434 did_filetype = keep_filetype; | 9439 did_filetype = keep_filetype; |
9435 } | 9440 } |
9436 | 9441 |
9437 /* | 9442 /* |
9438 * Note that we are applying autocmds. Some commands need to know. | 9443 * Note that we are applying autocmds. Some commands need to know. |
9528 * free any windows in the au_pending_free_win list. | 9533 * free any windows in the au_pending_free_win list. |
9529 */ | 9534 */ |
9530 if (!autocmd_busy) | 9535 if (!autocmd_busy) |
9531 { | 9536 { |
9532 restore_search_patterns(); | 9537 restore_search_patterns(); |
9533 restoreRedobuff(); | 9538 if (did_save_redobuff) |
9539 restoreRedobuff(); | |
9534 did_filetype = FALSE; | 9540 did_filetype = FALSE; |
9535 while (au_pending_free_buf != NULL) | 9541 while (au_pending_free_buf != NULL) |
9536 { | 9542 { |
9537 buf_T *b = au_pending_free_buf->b_next; | 9543 buf_T *b = au_pending_free_buf->b_next; |
9538 vim_free(au_pending_free_buf); | 9544 vim_free(au_pending_free_buf); |