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
This commit is contained in:
oni-link 2014-04-17 22:36:17 +02:00 committed by Thiago de Arruda
parent ca4005d759
commit c142abf7e8
2 changed files with 19 additions and 11 deletions

View File

@ -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)
@ -104,6 +106,19 @@ static void comp_botline(win_T *wp)
set_empty_rows(wp, done);
}
/*
* 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;

View File

@ -234,7 +234,7 @@ static int included_patches[] = {
229,
//228,
//227,
//226,
226,
//225,
//224,
//223,