mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
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)
This commit is contained in:
parent
20cc528320
commit
00aaa512d5
@ -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
|
||||
|
||||
|
@ -755,6 +755,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3090,
|
||||
/**/
|
||||
3089,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user