diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-13 01:51:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 01:51:17 +0200 |
commit | d5702a45346a738c4f684e790a3fcdb838dd24af (patch) | |
tree | 885039fa6a89bed117cc8dd88a22295dbe133554 /src/nvim/move.c | |
parent | 656648d8557d7a495775b2de565a96275549a4c9 (diff) | |
parent | 021f67df12ab954f74f488faf37a0971df502592 (diff) | |
download | rneovim-d5702a45346a738c4f684e790a3fcdb838dd24af.tar.gz rneovim-d5702a45346a738c4f684e790a3fcdb838dd24af.tar.bz2 rneovim-d5702a45346a738c4f684e790a3fcdb838dd24af.zip |
Merge #8987 from justinmk/vim-8.1.0373
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r-- | src/nvim/move.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index be7a8f43ec..4a2874abeb 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -104,16 +104,22 @@ static void redraw_for_cursorline(win_T *wp) if ((wp->w_p_rnu || wp->w_p_cul) && (wp->w_valid & VALID_CROW) == 0 && !pum_visible()) { - if (!wp->w_p_rnu && wp->w_redr_type <= VALID && last_cursorline != 0) { - // "last_cursorline" may be set for another window, worst case we - // redraw too much. This is optimized for moving the cursor around - // in the same window. - redrawWinline(wp, last_cursorline, false); - redrawWinline(wp, wp->w_cursor.lnum, false); - last_cursorline = wp->w_cursor.lnum; + if (wp->w_p_rnu) { + // win_line() will redraw the number column only. redraw_win_later(wp, VALID); - } else { - redraw_win_later(wp, SOME_VALID); + } + if (wp->w_p_cul) { + if (wp->w_redr_type <= VALID && last_cursorline != 0) { + // "last_cursorline" may be set for another window, worst case + // we redraw too much. This is optimized for moving the cursor + // around in the same window. + redrawWinline(wp, last_cursorline, false); + redrawWinline(wp, wp->w_cursor.lnum, false); + redraw_win_later(wp, VALID); + } else { + redraw_win_later(wp, SOME_VALID); + } + last_cursorline = wp->w_cursor.lnum; } } } |