Fix redraw regression with w_p_cole in visual mode

Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51.
Closes https://github.com/neovim/neovim/pull/11120.
This commit is contained in:
Daniel Hahler
2019-10-02 03:51:46 +02:00
parent 30ae60e7ca
commit b7d6caaa03
2 changed files with 50 additions and 1 deletions

View File

@@ -578,10 +578,13 @@ void conceal_check_cursor_line(void)
///
/// If true, both old and new cursorline will need
/// need to be redrawn when moving cursor within windows.
/// TODO(bfredl): VIsual_active shouldn't be needed, but is used to fix a glitch
/// caused by scrolling.
bool win_cursorline_standout(const win_T *wp)
FUNC_ATTR_NONNULL_ALL
{
return wp->w_p_cul || (wp->w_p_cole > 0 && !conceal_cursor_line(wp));
return wp->w_p_cul
|| (wp->w_p_cole > 0 && (VIsual_active || !conceal_cursor_line(wp)));
}
/*