# HG changeset patch # User Bram Moolenaar # Date 1625328902 -7200 # Node ID febccc86897e09d39240c57b216535d5cd6ce80e # Parent 80c759b23ce0199a8c690af159b73530199ea1ed patch 8.2.3090: in rare cases the cursor may be somewhere in a folded line Commit: https://github.com/vim/vim/commit/00aaa512d5e775e0db21e251f43d7afb8fca910f Author: Bram Moolenaar Date: Sat Jul 3 18:04:11 2021 +0200 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 --- 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3090, +/**/ 3089, /**/ 3088,