aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-03-07 16:21:20 +0100
committerGitHub <noreply@github.com>2025-03-07 16:21:20 +0100
commit8da59060c6dc9899d1f66d1c9b501b80496cc2e8 (patch)
treed323d70e522c9f24fb223d498daa767c7cb82970 /src
parentb31132f1c1fa47a9db368d5d28ee6dda8dc96ecc (diff)
downloadrneovim-8da59060c6dc9899d1f66d1c9b501b80496cc2e8.tar.gz
rneovim-8da59060c6dc9899d1f66d1c9b501b80496cc2e8.tar.bz2
rneovim-8da59060c6dc9899d1f66d1c9b501b80496cc2e8.zip
fix(marks): mark winline as invalid if change is in a concealed line (#32766)
Code that checks whether a `w_lines` entry has become invalid due to a change in a folded line should now also check for concealed lines.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer_defs.h4
-rw-r--r--src/nvim/change.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 95cee3c442..87d548bfab 100644
--- a/src/nvim/buffer_defs.h
+++ b/src/nvim/buffer_defs.h
@@ -810,8 +810,8 @@ struct tabpage_S {
typedef struct {
linenr_T wl_lnum; // buffer line number for logical line
uint16_t wl_size; // height in screen lines
- char wl_valid; // true values are valid for text in buffer
- char wl_folded; // true when this is a range of folded lines
+ bool wl_valid; // true values are valid for text in buffer
+ bool wl_folded; // true when this is a range of folded lines
linenr_T wl_foldend; // last buffer line number for folded line
linenr_T wl_lastlnum; // last buffer line number for logical line
} wline_T;
diff --git a/src/nvim/change.c b/src/nvim/change.c
index acdf131ddb..28854ae8aa 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -208,8 +208,9 @@ static void changed_lines_invalidate_win(win_T *wp, linenr_T lnum, colnr_T col,
wp->w_lines[i].wl_foldend += xtra;
wp->w_lines[i].wl_lastlnum += xtra;
}
- } else if (wp->w_lines[i].wl_foldend >= lnum) {
- // change somewhere inside this range of folded lines,
+ } else if (wp->w_lines[i].wl_foldend >= lnum
+ || wp->w_lines[i].wl_lastlnum >= lnum) {
+ // change somewhere inside this range of folded or concealed lines,
// may need to be redrawn
wp->w_lines[i].wl_valid = false;
}