summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-03-27 12:11:48 +0100
committerBram Moolenaar <Bram@vim.org>2014-03-27 12:11:48 +0100
commitb679875b29b519b5a612ffa6f4379ddfa5da5b12 (patch)
tree4bcfbdc0f0559b2cc357ce790fe953ae9d7b4ef7
parent327aa02ddaafa7c4585120ed152e078b9d74acea (diff)
updated for version 7.4.219v7.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.
-rw-r--r--src/move.c33
-rw-r--r--src/version.c2
2 files changed, 22 insertions, 13 deletions
diff --git a/src/move.c b/src/move.c
index fff0c9c07f..1c93ea6da2 100644
--- a/src/move.c
+++ b/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;
/* validate botline too, if update_screen doesn't do it */
@@ -1172,22 +1186,15 @@ curs_columns(may_scroll)
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
#ifdef FEAT_SYN_HL
- /* or when w_row changes and 'cursorline' is set. */
- || curwin->w_p_cul
-#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
- )
+ /* Redraw when w_virtcol changes and 'cursorcolumn' is set */
+ if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0
# ifdef FEAT_INS_EXPAND
- if (!pum_visible())
+ && !pum_visible()
# endif
- redraw_later(SOME_VALID);
+ )
+ redraw_later(SOME_VALID);
+#endif
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
}
diff --git a/src/version.c b/src/version.c
index e5e75fbec9..0f5fb5a516 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 219,
+/**/
218,
/**/
217,