diff options
author | Nick Neisen <nwneisen@gmail.com> | 2018-05-16 19:17:34 -0600 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-05-17 09:03:02 +0200 |
commit | 189a5f2b959b568ce598c4bf6345c1ec74f9d470 (patch) | |
tree | 1e00bbba16ebd741273fb8fd4e0bf52bc31e0213 | |
parent | aea70b4404399d353e1df0bd73ef344f5559843a (diff) | |
download | rneovim-189a5f2b959b568ce598c4bf6345c1ec74f9d470.tar.gz rneovim-189a5f2b959b568ce598c4bf6345c1ec74f9d470.tar.bz2 rneovim-189a5f2b959b568ce598c4bf6345c1ec74f9d470.zip |
coverity/13713: do_pending_operator: handle failed u_save_cursor()
-rw-r--r-- | src/nvim/normal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index e4310de5d8..43e8b6fb3d 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1812,7 +1812,10 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) } else { (void)op_delete(oap); if (oap->motion_type == kMTLineWise && has_format_option(FO_AUTO)) { - u_save_cursor(); // cursor line wasn't saved yet + // cursor line wasn't saved yet + if (u_save_cursor() == FAIL) { + break; + } } auto_format(false, true); } |