mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
Linting.
This commit is contained in:
@@ -2373,9 +2373,10 @@ static FILE *fopen_noinh_readbin(char *filename)
|
||||
# ifdef HAVE_FD_CLOEXEC
|
||||
{
|
||||
int fdflags = fcntl(fd_tmp, F_GETFD);
|
||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
|
||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
|
||||
(void)fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
return fdopen(fd_tmp, READBIN);
|
||||
|
@@ -2112,9 +2112,10 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
||||
&& flp->lvl > 0) {
|
||||
(void)foldFind(gap, startlnum - 1, &fp);
|
||||
if (fp >= ((fold_T *)gap->ga_data) + gap->ga_len
|
||||
|| fp->fd_top >= startlnum)
|
||||
|| fp->fd_top >= startlnum) {
|
||||
fp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Loop over all lines in this fold, or until "bot" is hit.
|
||||
@@ -2168,13 +2169,15 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
||||
}
|
||||
if (lvl < level + i) {
|
||||
(void)foldFind(&fp->fd_nested, flp->lnum - fp->fd_top, &fp2);
|
||||
if (fp2 != NULL)
|
||||
if (fp2 != NULL) {
|
||||
bot = fp2->fd_top + fp2->fd_len - 1 + fp->fd_top;
|
||||
} else if (fp->fd_top + fp->fd_len <= flp->lnum && lvl >= level)
|
||||
finish = TRUE;
|
||||
else
|
||||
}
|
||||
} else if (fp->fd_top + fp->fd_len <= flp->lnum && lvl >= level) {
|
||||
finish = true;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* At the start of the first nested fold and at the end of the current
|
||||
* fold: check if existing folds at this level, before the current
|
||||
|
@@ -2599,8 +2599,9 @@ do_mouse (
|
||||
else
|
||||
end_visual.col = rightcol;
|
||||
if (curwin->w_cursor.lnum >=
|
||||
(start_visual.lnum + end_visual.lnum) / 2)
|
||||
(start_visual.lnum + end_visual.lnum) / 2) {
|
||||
end_visual.lnum = start_visual.lnum;
|
||||
}
|
||||
|
||||
/* move VIsual to the right column */
|
||||
start_visual = curwin->w_cursor; /* save the cursor pos */
|
||||
@@ -3242,7 +3243,7 @@ void clear_showcmd(void)
|
||||
top = curwin->w_cursor.lnum;
|
||||
bot = VIsual.lnum;
|
||||
}
|
||||
/* Include closed folds as a whole. */
|
||||
// Include closed folds as a whole.
|
||||
(void)hasFolding(top, &top, NULL);
|
||||
(void)hasFolding(bot, NULL, &bot);
|
||||
lines = bot - top + 1;
|
||||
@@ -5150,9 +5151,10 @@ static void nv_gotofile(cmdarg_T *cap)
|
||||
ptr = grab_file_name(cap->count1, &lnum);
|
||||
|
||||
if (ptr != NULL) {
|
||||
/* do autowrite if necessary */
|
||||
if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !P_HID(curbuf))
|
||||
// do autowrite if necessary
|
||||
if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !P_HID(curbuf)) {
|
||||
(void)autowrite(curbuf, false);
|
||||
}
|
||||
setpcmark();
|
||||
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
|
||||
P_HID(curbuf) ? ECMD_HIDE : 0, curwin);
|
||||
|
Reference in New Issue
Block a user