diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2022-09-15 11:34:42 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2022-09-15 11:34:42 -0600 |
commit | c138a8755486ede83a2f579f4231158a93608703 (patch) | |
tree | 64fd6c09b7258ec5b80eb980aaebcf40e7799e8a /src/nvim/eval/userfunc.c | |
parent | d9091d5526c649d7fdf335a055aa69e8392161ac (diff) | |
parent | cd16d3df4c2a21ada895a1353712969045e5c728 (diff) | |
download | rneovim-mix.tar.gz rneovim-mix.tar.bz2 rneovim-mix.zip |
Merge branch 'fix_repeatcmdline' into mixmix
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r-- | src/nvim/eval/userfunc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 70c9e02d5c..82709b044b 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -823,6 +823,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett int started_profiling = false; bool did_save_redo = false; save_redo_T save_redo; + char_u* saved_repeat_cmdline = NULL; // If depth of calling is getting too high, don't execute the function if (depth >= p_mfd) { @@ -835,6 +836,9 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett // Save search patterns and redo buffer. save_search_patterns(); if (!ins_compl_active()) { + if (repeat_cmdline) { + saved_repeat_cmdline = xstrdup(repeat_cmdline); + } saveRedobuff(&save_redo); did_save_redo = true; } @@ -1184,6 +1188,8 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett // restore search patterns and redo buffer if (did_save_redo) { restoreRedobuff(&save_redo); + xfree(repeat_cmdline); + repeat_cmdline = saved_repeat_cmdline; } restore_search_patterns(); } |