diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-06-25 04:16:57 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-24 22:16:57 +0200 |
commit | 38fb83585421c45828a4934fc75f7952b2baf116 (patch) | |
tree | 895110c4cabaedc565cb2e3d458008799f351697 /src/nvim/fileio.c | |
parent | 83be7cec98713a7a313529b6a0cbadb465800c5c (diff) | |
download | rneovim-38fb83585421c45828a4934fc75f7952b2baf116.tar.gz rneovim-38fb83585421c45828a4934fc75f7952b2baf116.tar.bz2 rneovim-38fb83585421c45828a4934fc75f7952b2baf116.zip |
vim-patch:8.0.0548: saving the redo buffer only works one time (#8629)
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 vim/vim#1619)
https://github.com/vim/vim/commit/d4863aa99e0527e9505c79cbeafc68a6832200bf
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 5ddb3952de..0858436db3 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -6696,6 +6696,7 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, static int filechangeshell_busy = FALSE; proftime_T wait_time; bool did_save_redobuff = false; + save_redo_T save_redo; // Quickly return if there are no autocommands for this event or // autocommands are blocked. @@ -6876,7 +6877,7 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, if (!autocmd_busy) { save_search_patterns(); if (!ins_compl_active()) { - saveRedobuff(); + saveRedobuff(&save_redo); did_save_redobuff = true; } did_filetype = keep_filetype; @@ -6965,7 +6966,7 @@ static bool apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, if (!autocmd_busy) { restore_search_patterns(); if (did_save_redobuff) { - restoreRedobuff(); + restoreRedobuff(&save_redo); } did_filetype = FALSE; while (au_pending_free_buf != NULL) { |