vim-patch:7.4.219

Problem:    When 'relativenumber' or 'cursorline' are set the window is
            redrawn much to often. (Patrick Hemmer, Dominique Pelle)
Solution:   Check the VALID_CROW flag instead of VALID_WROW.

https://code.google.com/p/vim/source/detail?r=37af1e6e91bb1e8ceb89d3ba1c49a04ffd889880
This commit is contained in:
oni-link 2014-04-14 16:24:06 +02:00 committed by Thiago de Arruda
parent 824d64cb18
commit 1b55b127cb
2 changed files with 14 additions and 11 deletions

View File

@ -590,6 +590,14 @@ curs_rows (
}
}
/* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
* set. */
if ((curwin->w_p_rnu || curwin->w_p_cul)
&& (curwin->w_valid & VALID_CROW) == 0
&& !pum_visible()) {
redraw_later(SOME_VALID);
}
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
/* validate botline too, if update_screen doesn't do it */
@ -923,16 +931,11 @@ curs_columns (
if (prev_skipcol != curwin->w_skipcol)
redraw_later(NOT_VALID);
/* Redraw when w_row changes and 'relativenumber' is set */
if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
/* or when w_row changes and 'cursorline' is set. */
|| curwin->w_p_cul
))
/* or when w_virtcol changes and 'cursorcolumn' is set */
|| (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
)
if (!pum_visible())
redraw_later(SOME_VALID);
/* Redraw when w_virtcol changes and 'cursorcolumn' is set */
if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
&& !pum_visible()) {
redraw_later(SOME_VALID);
}
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
}

View File

@ -242,7 +242,7 @@ static int included_patches[] = {
//222,
//221,
//220,
//219,
219,
//218,
//217,
//216,