aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index b39b139f9b..d874768dfc 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2724,7 +2724,9 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
// So the 'u' command restores cursor position after ".p, save the cursor
// position now (though not saving any text).
if (command_start_char == 'a') {
- u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1);
+ if (u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1) == FAIL) {
+ return;
+ }
}
return;
}
@@ -2742,7 +2744,6 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
// Autocommands may be executed when saving lines for undo, which may make
// y_array invalid. Start undo now to avoid that.
if (u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1) == FAIL) {
- ELOG("Failed to save undo information");
return;
}
}