diff options
author | oni-link <knil.ino@gmail.com> | 2014-04-17 22:36:17 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-18 10:03:07 -0300 |
commit | c142abf7e88eb4f51ebb58fd8557b0aee5fed308 (patch) | |
tree | 2bb2328bbb0bcad0ad07a497e1f62540462e5003 | |
parent | ca4005d759d933e71dfd5bf1539992c9ed23b3ca (diff) | |
download | rneovim-c142abf7e88eb4f51ebb58fd8557b0aee5fed308.tar.gz rneovim-c142abf7e88eb4f51ebb58fd8557b0aee5fed308.tar.bz2 rneovim-c142abf7e88eb4f51ebb58fd8557b0aee5fed308.zip |
vim-patch:7.4.226
Problem: Cursurline highlighting not redrawn when scrolling. (John
Marriott)
Solution: Check for required redraw in two places.
https://code.google.com/p/vim/source/detail?r=b650f2db8f9604124c0ddfb14af0c04bd4ae0580
-rw-r--r-- | src/move.c | 28 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 19 insertions, 11 deletions
diff --git a/src/move.c b/src/move.c index 3092c00b0e..f234d968a6 100644 --- a/src/move.c +++ b/src/move.c @@ -30,6 +30,7 @@ #include "screen.h" static void comp_botline(win_T *wp); +static void redraw_for_cursorline(win_T *wp); static int scrolljump_value(void); static int check_top_offset(void); static void curs_rows(win_T *wp, int do_botline); @@ -89,6 +90,7 @@ static void comp_botline(win_T *wp) wp->w_cline_row = done; wp->w_cline_height = n; wp->w_cline_folded = folded; + redraw_for_cursorline(wp); wp->w_valid |= (VALID_CROW|VALID_CHEIGHT); } if (done + n > wp->w_height) @@ -105,6 +107,19 @@ static void comp_botline(win_T *wp) } /* +* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is +* set. +*/ +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()) { + redraw_win_later(wp, SOME_VALID); + } +} + +/* * Update curwin->w_topline and redraw if necessary. * Used to update the screen before printing a message. */ @@ -589,14 +604,7 @@ 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); - } - + redraw_for_cursorline(curwin); wp->w_valid |= VALID_CROW|VALID_CHEIGHT; /* validate botline too, if update_screen doesn't do it */ @@ -1911,8 +1919,8 @@ int onepage(int dir, long count) } comp_botline(curwin); curwin->w_cursor.lnum = curwin->w_botline - 1; - curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT| - VALID_WROW|VALID_CROW); + curwin->w_valid &= + ~(VALID_WCOL | VALID_CHEIGHT | VALID_WROW | VALID_CROW); } else { curwin->w_topline = loff.lnum; curwin->w_topfill = loff.fill; diff --git a/src/version.c b/src/version.c index d6076d665b..e1019be5bc 100644 --- a/src/version.c +++ b/src/version.c @@ -234,7 +234,7 @@ static int included_patches[] = { 229, //228, //227, - //226, + 226, //225, //224, //223, |