mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
vim-patch:8.0.0602: when gF fails to edit the file the cursor still moves
Problem: When gF fails to edit the file the cursor still moves to the found
line number.
Solution: Check the return value of do_ecmd(). (Michael Hwang)
2a79ed293c
This commit is contained in:
@@ -5234,9 +5234,9 @@ static void nv_gotofile(cmdarg_T *cap)
|
||||
(void)autowrite(curbuf, false);
|
||||
}
|
||||
setpcmark();
|
||||
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
|
||||
buf_hide(curbuf) ? ECMD_HIDE : 0, curwin);
|
||||
if (cap->nchar == 'F' && lnum >= 0) {
|
||||
if (do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
|
||||
buf_hide(curbuf) ? ECMD_HIDE : 0, curwin) == OK
|
||||
&& cap->nchar == 'F' && lnum >= 0) {
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
check_cursor_lnum();
|
||||
beginline(BL_SOL | BL_FIX);
|
||||
@@ -7151,7 +7151,7 @@ static void set_op_var(int optype)
|
||||
assert(opchar0 >= 0 && opchar0 <= UCHAR_MAX);
|
||||
opchars[0] = (char) opchar0;
|
||||
|
||||
int opchar1 = get_extra_op_char(optype);
|
||||
int opchar1 = get_extra_op_char(optype);
|
||||
assert(opchar1 >= 0 && opchar1 <= UCHAR_MAX);
|
||||
opchars[1] = (char) opchar1;
|
||||
|
||||
|
Reference in New Issue
Block a user