mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
undo: reduce reliance on curbuf
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user