patch 8.2.3090: in rare cases the cursor may be somewhere in a folded line
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)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 77a8a7b..7927bed 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -1379,6 +1379,12 @@
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