comparison src/fileio.c @ 11325:77f3b7316d8b v8.0.0548

patch 8.0.0548: saving the redo buffer only works one time commit https://github.com/vim/vim/commit/d4863aa99e0527e9505c79cbeafc68a6832200bf Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 7 19:50:12 2017 +0200 patch 8.0.0548: saving the redo buffer only works one time Problem: Saving the redo buffer only works one time, resulting in the "." command not working well for a function call inside another function call. (Ingo Karkat) Solution: Save the redo buffer at every user function call. (closes #1619)
author Christian Brabandt <cb@256bit.org>
date Fri, 07 Apr 2017 20:00:04 +0200
parents e08ead1d269f
children 16ccaedce025
comparison
equal deleted inserted replaced
11324:c9adf54ef624 11325:77f3b7316d8b
9314 static int filechangeshell_busy = FALSE; 9314 static int filechangeshell_busy = FALSE;
9315 #ifdef FEAT_PROFILE 9315 #ifdef FEAT_PROFILE
9316 proftime_T wait_time; 9316 proftime_T wait_time;
9317 #endif 9317 #endif
9318 int did_save_redobuff = FALSE; 9318 int did_save_redobuff = FALSE;
9319 save_redo_T save_redo;
9319 9320
9320 /* 9321 /*
9321 * Quickly return if there are no autocommands for this event or 9322 * Quickly return if there are no autocommands for this event or
9322 * autocommands are blocked. 9323 * autocommands are blocked.
9323 */ 9324 */
9519 save_search_patterns(); 9520 save_search_patterns();
9520 #ifdef FEAT_INS_EXPAND 9521 #ifdef FEAT_INS_EXPAND
9521 if (!ins_compl_active()) 9522 if (!ins_compl_active())
9522 #endif 9523 #endif
9523 { 9524 {
9524 saveRedobuff(); 9525 saveRedobuff(&save_redo);
9525 did_save_redobuff = TRUE; 9526 did_save_redobuff = TRUE;
9526 } 9527 }
9527 did_filetype = keep_filetype; 9528 did_filetype = keep_filetype;
9528 } 9529 }
9529 9530
9622 */ 9623 */
9623 if (!autocmd_busy) 9624 if (!autocmd_busy)
9624 { 9625 {
9625 restore_search_patterns(); 9626 restore_search_patterns();
9626 if (did_save_redobuff) 9627 if (did_save_redobuff)
9627 restoreRedobuff(); 9628 restoreRedobuff(&save_redo);
9628 did_filetype = FALSE; 9629 did_filetype = FALSE;
9629 while (au_pending_free_buf != NULL) 9630 while (au_pending_free_buf != NULL)
9630 { 9631 {
9631 buf_T *b = au_pending_free_buf->b_next; 9632 buf_T *b = au_pending_free_buf->b_next;
9632 vim_free(au_pending_free_buf); 9633 vim_free(au_pending_free_buf);