aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2018-06-25 04:16:57 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-06-24 22:16:57 +0200
commit38fb83585421c45828a4934fc75f7952b2baf116 (patch)
tree895110c4cabaedc565cb2e3d458008799f351697 /src/nvim/eval.c
parent83be7cec98713a7a313529b6a0cbadb465800c5c (diff)
downloadrneovim-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/eval.c')
-rw-r--r--src/nvim/eval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index d0e312475c..86ed9052aa 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -21174,6 +21174,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
proftime_T wait_start;
proftime_T call_start;
bool did_save_redo = false;
+ save_redo_T save_redo;
/* If depth of calling is getting too high, don't execute the function */
if (depth >= p_mfd) {
@@ -21186,7 +21187,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
// Save search patterns and redo buffer.
save_search_patterns();
if (!ins_compl_active()) {
- saveRedobuff();
+ saveRedobuff(&save_redo);
did_save_redo = true;
}
++fp->uf_calls;
@@ -21501,7 +21502,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
}
// restore search patterns and redo buffer
if (did_save_redo) {
- restoreRedobuff();
+ restoreRedobuff(&save_redo);
}
restore_search_patterns();
}