mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
lint
This commit is contained in:
@@ -2013,8 +2013,9 @@ int getfile(int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum,
|
||||
} else
|
||||
other = (fnum != curbuf->b_fnum);
|
||||
|
||||
if (other)
|
||||
++no_wait_return; /* don't wait for autowrite message */
|
||||
if (other) {
|
||||
no_wait_return++; // don't wait for autowrite message
|
||||
}
|
||||
if (other && !forceit && curbuf->b_nwindows == 1 && !buf_hide(curbuf)
|
||||
&& curbufIsChanged() && autowrite(curbuf, forceit) == FAIL) {
|
||||
if (p_confirm && p_write)
|
||||
@@ -2032,17 +2033,19 @@ int getfile(int fnum, char_u *ffname, char_u *sfname, int setpm, linenr_T lnum,
|
||||
if (setpm)
|
||||
setpcmark();
|
||||
if (!other) {
|
||||
if (lnum != 0)
|
||||
if (lnum != 0) {
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
}
|
||||
check_cursor_lnum();
|
||||
beginline(BL_SOL | BL_FIX);
|
||||
retval = 0; /* it's in the same file */
|
||||
retval = 0; // it's in the same file
|
||||
} else if (do_ecmd(fnum, ffname, sfname, NULL, lnum,
|
||||
(buf_hide(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0),
|
||||
curwin) == OK)
|
||||
retval = -1; /* opened another file */
|
||||
else
|
||||
retval = 1; /* error encountered */
|
||||
(buf_hide(curbuf) ? ECMD_HIDE : 0)
|
||||
+ (forceit ? ECMD_FORCEIT : 0), curwin) == OK) {
|
||||
retval = -1; // opened another file
|
||||
} else {
|
||||
retval = 1; // error encountered
|
||||
}
|
||||
|
||||
theend:
|
||||
xfree(free_me);
|
||||
|
Reference in New Issue
Block a user