aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-03-31 10:56:15 +0200
committerGitHub <noreply@github.com>2022-03-31 10:56:15 +0200
commitb2bd8004161853f53bf687b0b90119055fcb5cfb (patch)
tree61da0ef02bc7dbdfff8e232a9e36efe87676c293 /src/nvim/screen.c
parent1184097261260e53519db54548acf2c1e5ab7e68 (diff)
parent595c1a724af9fe93d4ff1df7d5c47e4c9c31a7a6 (diff)
downloadrneovim-b2bd8004161853f53bf687b0b90119055fcb5cfb.tar.gz
rneovim-b2bd8004161853f53bf687b0b90119055fcb5cfb.tar.bz2
rneovim-b2bd8004161853f53bf687b0b90119055fcb5cfb.zip
Merge pull request #17890 from zeertzjq/conceal-virtcol-changed
perf: only redraw concealed line if cursor has moved horizontally
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 262f17cd21..f922a50260 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -667,15 +667,11 @@ void conceal_check_cursor_line(void)
/// Whether cursorline is drawn in a special way
///
-/// If true, both old and new cursorline will 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.
+/// If true, both old and new cursorline will need to be redrawn when moving cursor within windows.
bool win_cursorline_standout(const win_T *wp)
FUNC_ATTR_NONNULL_ALL
{
- return wp->w_p_cul
- || (wp->w_p_cole > 0 && (VIsual_active || !conceal_cursor_line(wp)));
+ return wp->w_p_cul || (wp->w_p_cole > 0 && !conceal_cursor_line(wp));
}
/*