mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 03:58:32 +00:00
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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user