aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-04-14 16:24:06 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-14 18:26:24 -0300
commit1b55b127cbfc1c8f41783b6fea6cb7927020ed0c (patch)
tree810ec3925184d4cd9e2d64a01cba99a379275ecb
parent824d64cb185495f7aada32d7a63710916d448175 (diff)
downloadrneovim-1b55b127cbfc1c8f41783b6fea6cb7927020ed0c.tar.gz
rneovim-1b55b127cbfc1c8f41783b6fea6cb7927020ed0c.tar.bz2
rneovim-1b55b127cbfc1c8f41783b6fea6cb7927020ed0c.zip
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
-rw-r--r--src/move.c23
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 11 deletions
diff --git a/src/move.c b/src/move.c
index 47b9c63f80..c214d0a912 100644
--- a/src/move.c
+++ b/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_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;
}
diff --git a/src/version.c b/src/version.c
index 39f915a261..7866c7e40c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -242,7 +242,7 @@ static int included_patches[] = {
//222,
//221,
//220,
- //219,
+ 219,
//218,
//217,
//216,