coverity/13713: do_pending_operator: handle failed u_save_cursor()

This commit is contained in:
Nick Neisen
2018-05-16 19:17:34 -06:00
committed by Justin M. Keyes
parent aea70b4404
commit 189a5f2b95

View File

@@ -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);
}