*/
result_empty = (row + line_count >= end);
if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL)
+ {
+ // Avoid that lines are first cleared here and then redrawn, which
+ // results in many characters updated twice. This happens with CTRL-F
+ // in a vertically split window. With line-by-line scrolling
+ // USE_REDRAW should be faster.
+ if (line_count > 3)
+ return FAIL;
type = USE_REDRAW;
+ }
else if (can_clear(T_CD) && result_empty)
type = USE_T_CD;
else if (*T_CAL != NUL && (line_count > 1 || *T_AL == NUL))
int end,
int force, // even when line_count > p_ttyscroll
int clear_attr, // used for clearing lines
- win_T *wp UNUSED) // NULL or window to use width from
+ win_T *wp) // NULL or window to use width from
{
int j;
int i;
* 6. redraw the characters from ScreenLines[].
*/
if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL)
+ {
+ // Avoid that lines are first cleared here and then redrawn, which
+ // results in many characters updated twice. This happens with CTRL-F
+ // in a vertically split window. With line-by-line scrolling
+ // USE_REDRAW should be faster.
+ if (line_count > 3)
+ return FAIL;
type = USE_REDRAW;
+ }
else if (can_clear(T_CD) && result_empty)
type = USE_T_CD;
else if (row == 0 && (