Skip to content

Commit bf3250a

Browse files
committed
patch 8.1.0698: clearing the window is used too often
Problem: Clearing the window is used too often, causing the command line to be cleared when opening a tab. (Miroslav Koškár) Solution: Use NOT_VALID instead of CLEAR. (suggested by Jason Franklin, closes #630) Also do this for a few other places where clearing the screen isn't really needed.
1 parent b328cca commit bf3250a

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,8 @@ static char *(features[]) =
799799

800800
static int included_patches[] =
801801
{ /* Add new patch number below this line */
802+
/**/
803+
698,
802804
/**/
803805
697,
804806
/**/

src/window.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ win_exchange(long Prenum)
15771577
(void)win_comp_pos(); /* recompute window positions */
15781578

15791579
win_enter(wp, TRUE);
1580-
redraw_later(CLEAR);
1580+
redraw_all_later(NOT_VALID);
15811581
}
15821582

15831583
/*
@@ -1660,7 +1660,7 @@ win_rotate(int upwards, int count)
16601660
(void)win_comp_pos();
16611661
}
16621662

1663-
redraw_later(CLEAR);
1663+
redraw_all_later(NOT_VALID);
16641664
}
16651665

16661666
/*
@@ -1817,7 +1817,7 @@ win_equal_rec(
18171817
frame_new_height(topfr, height, FALSE, FALSE);
18181818
topfr->fr_win->w_wincol = col;
18191819
frame_new_width(topfr, width, FALSE, FALSE);
1820-
redraw_all_later(CLEAR);
1820+
redraw_all_later(NOT_VALID);
18211821
}
18221822
}
18231823
else if (topfr->fr_layout == FR_ROW)
@@ -3702,7 +3702,7 @@ win_new_tabpage(int after)
37023702
entering_window(curwin);
37033703
#endif
37043704

3705-
redraw_all_later(CLEAR);
3705+
redraw_all_later(NOT_VALID);
37063706
apply_autocmds(EVENT_WINNEW, NULL, NULL, FALSE, curbuf);
37073707
apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
37083708
apply_autocmds(EVENT_TABNEW, NULL, NULL, FALSE, curbuf);
@@ -3939,7 +3939,6 @@ enter_tabpage(
39393939

39403940
last_status(FALSE); /* status line may appear or disappear */
39413941
(void)win_comp_pos(); /* recompute w_winrow for all windows */
3942-
must_redraw = CLEAR; /* need to redraw everything */
39433942
#ifdef FEAT_DIFF
39443943
diff_need_scrollbind = TRUE;
39453944
#endif
@@ -3973,7 +3972,7 @@ enter_tabpage(
39733972
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
39743973
}
39753974

3976-
redraw_all_later(CLEAR);
3975+
redraw_all_later(NOT_VALID);
39773976
}
39783977

39793978
/*
@@ -6569,7 +6568,7 @@ restore_snapshot(
65696568
win_comp_pos();
65706569
if (wp != NULL && close_curwin)
65716570
win_goto(wp);
6572-
redraw_all_later(CLEAR);
6571+
redraw_all_later(NOT_VALID);
65736572
}
65746573
clear_snapshot(curtab, idx);
65756574
}

0 commit comments

Comments
 (0)