Skip to content

Commit

Permalink
patch 8.2.3090: in rare cases the cursor may be somewhere in a folded…
Browse files Browse the repository at this point in the history
… 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)
  • Loading branch information
brammool committed Jul 3, 2021
1 parent 20cc528 commit 00aaa51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/drawscreen.c
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -755,6 +755,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3090,
/**/
3089,
/**/
Expand Down

0 comments on commit 00aaa51

Please sign in to comment.