diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-23 22:45:51 +0200 |
---|---|---|
committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-07-06 19:08:32 +0200 |
commit | 763c852812c8c7e819881a76a237b6f19920f803 (patch) | |
tree | a2892e9cf4e89e5f58ed4870bf40af3f816f33f7 /src/nvim/eval/funcs.c | |
parent | 55a2c513aafb386c01259fca711b2e0f9b85e359 (diff) | |
download | rneovim-763c852812c8c7e819881a76a237b6f19920f803.tar.gz rneovim-763c852812c8c7e819881a76a237b6f19920f803.tar.bz2 rneovim-763c852812c8c7e819881a76a237b6f19920f803.zip |
undo: reduce reliance on curbuf
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 1ba31bfe68..3cda7ec5d4 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -1078,10 +1078,11 @@ static void f_complete(typval_T *argvars, typval_T *rettv, FunPtr fptr) return; } - /* Check for undo allowed here, because if something was already inserted - * the line was already saved for undo and this check isn't done. */ - if (!undo_allowed()) + // Check for undo allowed here, because if something was already inserted + // the line was already saved for undo and this check isn't done. + if (!undo_allowed(curbuf)) { return; + } if (argvars[1].v_type != VAR_LIST) { EMSG(_(e_invarg)); |