summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-03 18:04:11 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-03 18:04:11 +0200
commit00aaa512d5e775e0db21e251f43d7afb8fca910f (patch)
treeba1cc4d4be80845dad887042909e5f673ea07eda /src/drawscreen.c
parent20cc52832067d22a3cd47dfb0805251228c32e7d (diff)
patch 8.2.3090: in rare cases the cursor may be somewhere in a folded linev8.2.3090
Problem: With concealing enabled and indirectly closing a fold the cursor may be somewhere in a folded line. Solution: Recompute the cursor position when the cursor line can be concealed. (closes #8480)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 77a8a7b276..7927bedc23 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1379,6 +1379,12 @@ fold_line(
curwin->w_cline_folded = TRUE;
curwin->w_valid |= (VALID_CHEIGHT|VALID_CROW);
}
+
+# ifdef FEAT_CONCEAL
+ // When the line was not folded w_wrow may have been set, recompute it.
+ if (wp == curwin && lnum == wp->w_cursor.lnum && conceal_cursor_line(wp))
+ curs_columns(TRUE);
+# endif
}
#endif