aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-10-02 03:51:46 +0200
committerDaniel Hahler <git@thequod.de>2019-10-03 07:47:40 +0200
commitd453d2c484568bec7f467d48668e3f4bafc86091 (patch)
tree6f90c935a21b89209ae0fc53f1a7b49564b32577 /src
parentc5d1b0f3da4af9100d0337d6753b7268e591d320 (diff)
downloadrneovim-d453d2c484568bec7f467d48668e3f4bafc86091.tar.gz
rneovim-d453d2c484568bec7f467d48668e3f4bafc86091.tar.bz2
rneovim-d453d2c484568bec7f467d48668e3f4bafc86091.zip
[release-0.4] 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.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 6867acab4f..c6b562cc8b 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -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)));
}
/*