Mercurial > vim
changeset 25106:febccc86897e v8.2.3090
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 <Bram@vim.org>
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 03 Jul 2021 18:15:02 +0200 |
parents | 80c759b23ce0 |
children | f089dcc167bb |
files | src/drawscreen.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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