mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.4.226
Problem: Cursurline highlighting not redrawn when scrolling. (John Marriott) Solution: Check for required redraw in two places.
This commit is contained in:
42
src/move.c
42
src/move.c
@@ -20,6 +20,7 @@
|
|||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
static void comp_botline __ARGS((win_T *wp));
|
static void comp_botline __ARGS((win_T *wp));
|
||||||
|
static void redraw_for_cursorline __ARGS((win_T *wp));
|
||||||
static int scrolljump_value __ARGS((void));
|
static int scrolljump_value __ARGS((void));
|
||||||
static int check_top_offset __ARGS((void));
|
static int check_top_offset __ARGS((void));
|
||||||
static void curs_rows __ARGS((win_T *wp, int do_botline));
|
static void curs_rows __ARGS((win_T *wp, int do_botline));
|
||||||
@@ -106,6 +107,7 @@ comp_botline(wp)
|
|||||||
#ifdef FEAT_FOLDING
|
#ifdef FEAT_FOLDING
|
||||||
wp->w_cline_folded = folded;
|
wp->w_cline_folded = folded;
|
||||||
#endif
|
#endif
|
||||||
|
redraw_for_cursorline(wp);
|
||||||
wp->w_valid |= (VALID_CROW|VALID_CHEIGHT);
|
wp->w_valid |= (VALID_CROW|VALID_CHEIGHT);
|
||||||
}
|
}
|
||||||
if (done + n > wp->w_height)
|
if (done + n > wp->w_height)
|
||||||
@@ -123,6 +125,27 @@ comp_botline(wp)
|
|||||||
set_empty_rows(wp, done);
|
set_empty_rows(wp, done);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
|
||||||
|
* set.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
redraw_for_cursorline(wp)
|
||||||
|
win_T *wp;
|
||||||
|
{
|
||||||
|
if ((wp->w_p_rnu
|
||||||
|
#ifdef FEAT_SYN_HL
|
||||||
|
|| wp->w_p_cul
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
&& (wp->w_valid & VALID_CROW) == 0
|
||||||
|
# ifdef FEAT_INS_EXPAND
|
||||||
|
&& !pum_visible()
|
||||||
|
# endif
|
||||||
|
)
|
||||||
|
redraw_win_later(wp, SOME_VALID);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update curwin->w_topline and redraw if necessary.
|
* Update curwin->w_topline and redraw if necessary.
|
||||||
* Used to update the screen before printing a message.
|
* Used to update the screen before printing a message.
|
||||||
@@ -772,20 +795,7 @@ curs_rows(wp, do_botline)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is
|
redraw_for_cursorline(curwin);
|
||||||
* 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;
|
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
|
||||||
|
|
||||||
/* validate botline too, if update_screen doesn't do it */
|
/* validate botline too, if update_screen doesn't do it */
|
||||||
@@ -2504,8 +2514,8 @@ onepage(dir, count)
|
|||||||
}
|
}
|
||||||
comp_botline(curwin);
|
comp_botline(curwin);
|
||||||
curwin->w_cursor.lnum = curwin->w_botline - 1;
|
curwin->w_cursor.lnum = curwin->w_botline - 1;
|
||||||
curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT|
|
curwin->w_valid &=
|
||||||
VALID_WROW|VALID_CROW);
|
~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|VALID_CROW);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -734,6 +734,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
226,
|
||||||
/**/
|
/**/
|
||||||
225,
|
225,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user