mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #19595 from zeertzjq/vim-9.0.0124
vim-patch:9.0.0124: code has more indent than needed
This commit is contained in:
commit
8952def50a
@ -656,6 +656,7 @@ void diff_redraw(bool dofold)
|
|||||||
if (!wp->w_p_diff || !buf_valid(wp->w_buffer)) {
|
if (!wp->w_p_diff || !buf_valid(wp->w_buffer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
redraw_later(wp, SOME_VALID);
|
redraw_later(wp, SOME_VALID);
|
||||||
if (wp != curwin) {
|
if (wp != curwin) {
|
||||||
wp_other = wp;
|
wp_other = wp;
|
||||||
@ -664,8 +665,8 @@ void diff_redraw(bool dofold)
|
|||||||
foldUpdateAll(wp);
|
foldUpdateAll(wp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// A change may have made filler lines invalid, need to take care
|
// A change may have made filler lines invalid, need to take care of
|
||||||
// of that for other windows.
|
// that for other windows.
|
||||||
int n = diff_check(wp, wp->w_topline);
|
int n = diff_check(wp, wp->w_topline);
|
||||||
|
|
||||||
if (((wp != curwin) && (wp->w_topfill > 0)) || (n > 0)) {
|
if (((wp != curwin) && (wp->w_topfill > 0)) || (n > 0)) {
|
||||||
@ -682,6 +683,7 @@ void diff_redraw(bool dofold)
|
|||||||
check_topfill(wp, false);
|
check_topfill(wp, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wp_other != NULL && curwin->w_p_scb) {
|
if (wp_other != NULL && curwin->w_p_scb) {
|
||||||
if (used_max_fill_curwin) {
|
if (used_max_fill_curwin) {
|
||||||
// The current window was set to use the maximum number of filler
|
// The current window was set to use the maximum number of filler
|
||||||
|
@ -4311,8 +4311,8 @@ static bool ins_start_select(int c)
|
|||||||
case K_S_DOWN:
|
case K_S_DOWN:
|
||||||
case K_S_END:
|
case K_S_END:
|
||||||
case K_S_HOME:
|
case K_S_HOME:
|
||||||
// Start selection right away, the cursor can move with
|
// Start selection right away, the cursor can move with CTRL-O when
|
||||||
// CTRL-O when beyond the end of the line.
|
// beyond the end of the line.
|
||||||
start_selection();
|
start_selection();
|
||||||
|
|
||||||
// Execute the key in (insert) Select mode.
|
// Execute the key in (insert) Select mode.
|
||||||
|
@ -5793,6 +5793,7 @@ static void do_helptags(char *dirname, bool add_help_tags, bool ignore_writeerr)
|
|||||||
if (len <= 4) {
|
if (len <= 4) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (STRICMP(files[i] + len - 4, ".txt") == 0) {
|
if (STRICMP(files[i] + len - 4, ".txt") == 0) {
|
||||||
// ".txt" -> language "en"
|
// ".txt" -> language "en"
|
||||||
lang[0] = 'e';
|
lang[0] = 'e';
|
||||||
|
@ -2922,10 +2922,11 @@ void check_scrollbind(linenr_T topline_diff, long leftcol_diff)
|
|||||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||||
curwin = wp;
|
curwin = wp;
|
||||||
curbuf = curwin->w_buffer;
|
curbuf = curwin->w_buffer;
|
||||||
// skip original window and windows with 'noscrollbind'
|
// skip original window and windows with 'noscrollbind'
|
||||||
if (curwin == old_curwin || !curwin->w_p_scb) {
|
if (curwin == old_curwin || !curwin->w_p_scb) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do the vertical scroll
|
// do the vertical scroll
|
||||||
if (want_ver) {
|
if (want_ver) {
|
||||||
if (old_curwin->w_p_diff && curwin->w_p_diff) {
|
if (old_curwin->w_p_diff && curwin->w_p_diff) {
|
||||||
|
@ -1390,24 +1390,21 @@ static bool syn_stack_equal(synstate_T *sp)
|
|||||||
if (bp[i].bs_extmatch == CUR_STATE(i).si_extmatch) {
|
if (bp[i].bs_extmatch == CUR_STATE(i).si_extmatch) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// When the extmatch pointers are different, the strings in
|
// When the extmatch pointers are different, the strings in them can
|
||||||
// them can still be the same. Check if the extmatch
|
// still be the same. Check if the extmatch references are equal.
|
||||||
// references are equal.
|
|
||||||
bsx = bp[i].bs_extmatch;
|
bsx = bp[i].bs_extmatch;
|
||||||
six = CUR_STATE(i).si_extmatch;
|
six = CUR_STATE(i).si_extmatch;
|
||||||
// If one of the extmatch pointers is NULL the states are
|
// If one of the extmatch pointers is NULL the states are different.
|
||||||
// different.
|
|
||||||
if (bsx == NULL || six == NULL) {
|
if (bsx == NULL || six == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j < NSUBEXP; j++) {
|
for (j = 0; j < NSUBEXP; j++) {
|
||||||
// Check each referenced match string. They must all be
|
// Check each referenced match string. They must all be equal.
|
||||||
// equal.
|
|
||||||
if (bsx->matches[j] != six->matches[j]) {
|
if (bsx->matches[j] != six->matches[j]) {
|
||||||
// If the pointer is different it can still be the
|
// If the pointer is different it can still be the same text.
|
||||||
// same text. Compare the strings, ignore case when
|
// Compare the strings, ignore case when the start item has the
|
||||||
// the start item has the sp_ic flag set.
|
// sp_ic flag set.
|
||||||
if (bsx->matches[j] == NULL || six->matches[j] == NULL) {
|
if (bsx->matches[j] == NULL || six->matches[j] == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1422,11 +1419,7 @@ static bool syn_stack_equal(synstate_T *sp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i < 0) {
|
return i < 0 ? true : false;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1074,7 +1074,6 @@ func Test_split_cmds_with_no_room()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_window_resize()
|
func Test_window_resize()
|
||||||
throw 'Skipped: Nvim supports cmdheight=0'
|
|
||||||
" Vertical :resize (absolute, relative, min and max size).
|
" Vertical :resize (absolute, relative, min and max size).
|
||||||
vsplit
|
vsplit
|
||||||
vert resize 8
|
vert resize 8
|
||||||
|
@ -2150,12 +2150,11 @@ static void win_equal_rec(win_T *next_curwin, bool current, frame_T *topfr, int
|
|||||||
} else {
|
} else {
|
||||||
next_curwin_size = -1;
|
next_curwin_size = -1;
|
||||||
FOR_ALL_FRAMES(fr, topfr->fr_child) {
|
FOR_ALL_FRAMES(fr, topfr->fr_child) {
|
||||||
// If 'winfixwidth' set keep the window width if
|
|
||||||
// possible.
|
|
||||||
// Watch out for this window being the next_curwin.
|
|
||||||
if (!frame_fixed_width(fr)) {
|
if (!frame_fixed_width(fr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// If 'winfixwidth' set keep the window width if possible.
|
||||||
|
// Watch out for this window being the next_curwin.
|
||||||
n = frame_minwidth(fr, NOWIN);
|
n = frame_minwidth(fr, NOWIN);
|
||||||
new_size = fr->fr_width;
|
new_size = fr->fr_width;
|
||||||
if (frame_has_win(fr, next_curwin)) {
|
if (frame_has_win(fr, next_curwin)) {
|
||||||
@ -2281,12 +2280,11 @@ static void win_equal_rec(win_T *next_curwin, bool current, frame_T *topfr, int
|
|||||||
} else {
|
} else {
|
||||||
next_curwin_size = -1;
|
next_curwin_size = -1;
|
||||||
FOR_ALL_FRAMES(fr, topfr->fr_child) {
|
FOR_ALL_FRAMES(fr, topfr->fr_child) {
|
||||||
// If 'winfixheight' set keep the window height if
|
|
||||||
// possible.
|
|
||||||
// Watch out for this window being the next_curwin.
|
|
||||||
if (!frame_fixed_height(fr)) {
|
if (!frame_fixed_height(fr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// If 'winfixheight' set keep the window height if possible.
|
||||||
|
// Watch out for this window being the next_curwin.
|
||||||
n = frame_minheight(fr, NOWIN);
|
n = frame_minheight(fr, NOWIN);
|
||||||
new_size = fr->fr_height;
|
new_size = fr->fr_height;
|
||||||
if (frame_has_win(fr, next_curwin)) {
|
if (frame_has_win(fr, next_curwin)) {
|
||||||
@ -3898,9 +3896,7 @@ void close_others(int message, int forceit)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
win_close(wp,
|
win_close(wp, !buf_hide(wp->w_buffer) && !bufIsChanged(wp->w_buffer), false);
|
||||||
!buf_hide(wp->w_buffer) && !bufIsChanged(wp->w_buffer),
|
|
||||||
false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message && !ONE_WINDOW) {
|
if (message && !ONE_WINDOW) {
|
||||||
@ -5555,6 +5551,7 @@ static void frame_setheight(frame_T *curfrp, int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (curfrp->fr_parent == NULL) {
|
if (curfrp->fr_parent == NULL) {
|
||||||
|
// topframe: can only change the command line
|
||||||
if (height > ROWS_AVAIL) {
|
if (height > ROWS_AVAIL) {
|
||||||
// If height is greater than the available space, try to create space for
|
// If height is greater than the available space, try to create space for
|
||||||
// the frame by reducing 'cmdheight' if possible, while making sure
|
// the frame by reducing 'cmdheight' if possible, while making sure
|
||||||
|
Loading…
Reference in New Issue
Block a user