mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
824d64cb18
commit
1b55b127cb
21
src/move.c
21
src/move.c
@ -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 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;
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ static int included_patches[] = {
|
||||
//222,
|
||||
//221,
|
||||
//220,
|
||||
//219,
|
||||
219,
|
||||
//218,
|
||||
//217,
|
||||
//216,
|
||||
|
Loading…
Reference in New Issue
Block a user