mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
Merge pull request #4632 from KillTheMule/vim-7.4.822
vim-patch:7.4.822
This commit is contained in:
@@ -5048,7 +5048,9 @@ helptags_one (
|
|||||||
/*
|
/*
|
||||||
* Sort the tags.
|
* Sort the tags.
|
||||||
*/
|
*/
|
||||||
sort_strings((char_u **)ga.ga_data, ga.ga_len);
|
if (ga.ga_data != NULL) {
|
||||||
|
sort_strings((char_u **)ga.ga_data, ga.ga_len);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for duplicates.
|
* Check for duplicates.
|
||||||
|
@@ -2373,8 +2373,9 @@ static FILE *fopen_noinh_readbin(char *filename)
|
|||||||
# ifdef HAVE_FD_CLOEXEC
|
# ifdef HAVE_FD_CLOEXEC
|
||||||
{
|
{
|
||||||
int fdflags = fcntl(fd_tmp, F_GETFD);
|
int fdflags = fcntl(fd_tmp, F_GETFD);
|
||||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
|
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
|
||||||
fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
|
(void)fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@@ -2110,10 +2110,11 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
|||||||
*/
|
*/
|
||||||
if (getlevel == foldlevelMarker && flp->start <= flp->lvl - level
|
if (getlevel == foldlevelMarker && flp->start <= flp->lvl - level
|
||||||
&& flp->lvl > 0) {
|
&& flp->lvl > 0) {
|
||||||
foldFind(gap, startlnum - 1, &fp);
|
(void)foldFind(gap, startlnum - 1, &fp);
|
||||||
if (fp >= ((fold_T *)gap->ga_data) + gap->ga_len
|
if (fp >= ((fold_T *)gap->ga_data) + gap->ga_len
|
||||||
|| fp->fd_top >= startlnum)
|
|| fp->fd_top >= startlnum) {
|
||||||
fp = NULL;
|
fp = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2167,13 +2168,15 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lvl < level + i) {
|
if (lvl < level + i) {
|
||||||
foldFind(&fp->fd_nested, flp->lnum - fp->fd_top, &fp2);
|
(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;
|
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 if (fp->fd_top + fp->fd_len <= flp->lnum && lvl >= level) {
|
||||||
else
|
finish = true;
|
||||||
|
} else {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* At the start of the first nested fold and at the end of the current
|
/* At the start of the first nested fold and at the end of the current
|
||||||
|
@@ -1062,8 +1062,8 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
|
|||||||
if (qf_init(wp, tmp, (char_u *)"%f%*\\t%l%*\\t%m",
|
if (qf_init(wp, tmp, (char_u *)"%f%*\\t%l%*\\t%m",
|
||||||
*qfpos == '-', cmdline) > 0) {
|
*qfpos == '-', cmdline) > 0) {
|
||||||
if (postponed_split != 0) {
|
if (postponed_split != 0) {
|
||||||
win_split(postponed_split > 0 ? postponed_split : 0,
|
(void)win_split(postponed_split > 0 ? postponed_split : 0,
|
||||||
postponed_split_flags);
|
postponed_split_flags);
|
||||||
RESET_BINDING(curwin);
|
RESET_BINDING(curwin);
|
||||||
postponed_split = 0;
|
postponed_split = 0;
|
||||||
}
|
}
|
||||||
|
@@ -2598,11 +2598,10 @@ do_mouse (
|
|||||||
end_visual.col = leftcol;
|
end_visual.col = leftcol;
|
||||||
else
|
else
|
||||||
end_visual.col = rightcol;
|
end_visual.col = rightcol;
|
||||||
if (curwin->w_cursor.lnum <
|
if (curwin->w_cursor.lnum >=
|
||||||
(start_visual.lnum + end_visual.lnum) / 2)
|
(start_visual.lnum + end_visual.lnum) / 2) {
|
||||||
end_visual.lnum = end_visual.lnum;
|
|
||||||
else
|
|
||||||
end_visual.lnum = start_visual.lnum;
|
end_visual.lnum = start_visual.lnum;
|
||||||
|
}
|
||||||
|
|
||||||
/* move VIsual to the right column */
|
/* move VIsual to the right column */
|
||||||
start_visual = curwin->w_cursor; /* save the cursor pos */
|
start_visual = curwin->w_cursor; /* save the cursor pos */
|
||||||
@@ -3244,9 +3243,9 @@ void clear_showcmd(void)
|
|||||||
top = curwin->w_cursor.lnum;
|
top = curwin->w_cursor.lnum;
|
||||||
bot = VIsual.lnum;
|
bot = VIsual.lnum;
|
||||||
}
|
}
|
||||||
/* Include closed folds as a whole. */
|
// Include closed folds as a whole.
|
||||||
hasFolding(top, &top, NULL);
|
(void)hasFolding(top, &top, NULL);
|
||||||
hasFolding(bot, NULL, &bot);
|
(void)hasFolding(bot, NULL, &bot);
|
||||||
lines = bot - top + 1;
|
lines = bot - top + 1;
|
||||||
|
|
||||||
if (VIsual_mode == Ctrl_V) {
|
if (VIsual_mode == Ctrl_V) {
|
||||||
@@ -5154,9 +5153,10 @@ static void nv_gotofile(cmdarg_T *cap)
|
|||||||
ptr = grab_file_name(cap->count1, &lnum);
|
ptr = grab_file_name(cap->count1, &lnum);
|
||||||
|
|
||||||
if (ptr != NULL) {
|
if (ptr != NULL) {
|
||||||
/* do autowrite if necessary */
|
// do autowrite if necessary
|
||||||
if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !P_HID(curbuf))
|
if (curbufIsChanged() && curbuf->b_nwindows <= 1 && !P_HID(curbuf)) {
|
||||||
autowrite(curbuf, false);
|
(void)autowrite(curbuf, false);
|
||||||
|
}
|
||||||
setpcmark();
|
setpcmark();
|
||||||
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
|
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LAST,
|
||||||
P_HID(curbuf) ? ECMD_HIDE : 0, curwin);
|
P_HID(curbuf) ? ECMD_HIDE : 0, curwin);
|
||||||
|
@@ -855,7 +855,7 @@ static int included_patches[] = {
|
|||||||
825,
|
825,
|
||||||
// 824 NA
|
// 824 NA
|
||||||
823,
|
823,
|
||||||
// 822,
|
822,
|
||||||
// 821 NA
|
// 821 NA
|
||||||
820,
|
820,
|
||||||
819,
|
819,
|
||||||
|
@@ -97,7 +97,7 @@ do_window (
|
|||||||
* don't replicate the quickfix buffer. */
|
* don't replicate the quickfix buffer. */
|
||||||
if (bt_quickfix(curbuf))
|
if (bt_quickfix(curbuf))
|
||||||
goto newwindow;
|
goto newwindow;
|
||||||
win_split((int)Prenum, 0);
|
(void)win_split((int)Prenum, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* split current window in two parts, vertically */
|
/* split current window in two parts, vertically */
|
||||||
@@ -108,7 +108,7 @@ do_window (
|
|||||||
* don't replicate the quickfix buffer. */
|
* don't replicate the quickfix buffer. */
|
||||||
if (bt_quickfix(curbuf))
|
if (bt_quickfix(curbuf))
|
||||||
goto newwindow;
|
goto newwindow;
|
||||||
win_split((int)Prenum, WSP_VERT);
|
(void)win_split((int)Prenum, WSP_VERT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* split current window and edit alternate file */
|
/* split current window and edit alternate file */
|
||||||
|
Reference in New Issue
Block a user