vim-patch:8.2.2029: Coverity warns for not checking return value

Problem:    Coverity warns for not checking return value.
Solution:   Check that u_save_cursor() returns OK.
5546688fb6
This commit is contained in:
Jan Edmund Lazo
2020-11-21 12:02:05 -05:00
parent 5ea38abd53
commit 5a4f049c38

View File

@@ -1847,13 +1847,12 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
CancelRedo();
} else {
(void)op_delete(oap);
if (oap->motion_type == kMTLineWise && has_format_option(FO_AUTO)) {
// cursor line wasn't saved yet
if (u_save_cursor() == FAIL) {
break;
}
// save cursor line for undo if it wasn't saved yet
if (oap->motion_type == kMTLineWise
&& has_format_option(FO_AUTO)
&& u_save_cursor() == OK) {
auto_format(false, true);
}
auto_format(false, true);
}
break;