mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 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.
This commit is contained in:
parent
327aa02dda
commit
b679875b29
31
src/move.c
31
src/move.c
@ -772,6 +772,20 @@ curs_rows(wp, do_botline)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
|
||||||
|
* set. */
|
||||||
|
if ((curwin->w_p_rnu
|
||||||
|
#ifdef FEAT_SYN_HL
|
||||||
|
|| curwin->w_p_cul
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
&& (curwin->w_valid & VALID_CROW) == 0
|
||||||
|
# ifdef FEAT_INS_EXPAND
|
||||||
|
&& !pum_visible()
|
||||||
|
# endif
|
||||||
|
)
|
||||||
|
redraw_later(SOME_VALID);
|
||||||
|
|
||||||
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
|
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
|
||||||
|
|
||||||
/* validate botline too, if update_screen doesn't do it */
|
/* validate botline too, if update_screen doesn't do it */
|
||||||
@ -1172,22 +1186,15 @@ curs_columns(may_scroll)
|
|||||||
if (prev_skipcol != curwin->w_skipcol)
|
if (prev_skipcol != curwin->w_skipcol)
|
||||||
redraw_later(NOT_VALID);
|
redraw_later(NOT_VALID);
|
||||||
|
|
||||||
/* Redraw when w_row changes and 'relativenumber' is set */
|
|
||||||
if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu
|
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
/* or when w_row changes and 'cursorline' is set. */
|
/* Redraw when w_virtcol changes and 'cursorcolumn' is set */
|
||||||
|| curwin->w_p_cul
|
if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
|
||||||
#endif
|
|
||||||
))
|
|
||||||
#ifdef FEAT_SYN_HL
|
|
||||||
/* or when w_virtcol changes and 'cursorcolumn' is set */
|
|
||||||
|| (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
# ifdef FEAT_INS_EXPAND
|
# ifdef FEAT_INS_EXPAND
|
||||||
if (!pum_visible())
|
&& !pum_visible()
|
||||||
# endif
|
# endif
|
||||||
|
)
|
||||||
redraw_later(SOME_VALID);
|
redraw_later(SOME_VALID);
|
||||||
|
#endif
|
||||||
|
|
||||||
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
|
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
|
||||||
}
|
}
|
||||||
|
@ -734,6 +734,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
219,
|
||||||
/**/
|
/**/
|
||||||
218,
|
218,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user