aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-12-16 15:39:26 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-12-16 15:39:26 -0500
commit10a45846dc959f8b3ab9436f0809e90d1adf4ee4 (patch)
treeb0d02669f08f94b80abcc0a8d9687ba4c8c80561 /src/nvim/ops.c
parent3a61b84543c7cd843fe60d9ec4b356fb18f6a726 (diff)
parente0b23b3d090f58c772ff0175c38afa1d5e0f1612 (diff)
downloadrneovim-10a45846dc959f8b3ab9436f0809e90d1adf4ee4.tar.gz
rneovim-10a45846dc959f8b3ab9436f0809e90d1adf4ee4.tar.bz2
rneovim-10a45846dc959f8b3ab9436f0809e90d1adf4ee4.zip
Merge pull request #1688 from elmart/coverity-issues-1
coverity issues
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index a6dee2be5b..931b877a95 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -30,6 +30,7 @@
#include "nvim/fold.h"
#include "nvim/getchar.h"
#include "nvim/indent.h"
+#include "nvim/log.h"
#include "nvim/mark.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
@@ -2641,7 +2642,10 @@ do_put (
/* Autocommands may be executed when saving lines for undo, which may make
* y_array invalid. Start undo now to avoid that. */
- u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1);
+ if (u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1) == FAIL) {
+ ELOG(_("Failed to save undo information"));
+ return;
+ }
if (insert_string != NULL) {
y_type = MCHAR;