mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
fix(column): don't count signs on lines beyond eob #33410
Problem: Computed previous buffer line count may be beyond end of buffer. This results in signs being removed from `b_signcols` that were never included in it, tripping an assertion. Solution: Store the previous line count as it was before appending or deleting lines. Use it to clamp the edited region when clearing signs before a splice, after which it is reset.
This commit is contained in:
@@ -720,6 +720,11 @@ struct file_buffer {
|
||||
MarkTree b_marktree[1];
|
||||
Map(uint32_t, uint32_t) b_extmark_ns[1]; // extmark namespaces
|
||||
|
||||
// Store the line count as it was before appending or inserting lines.
|
||||
// Used to determine a valid range before splicing marks, when the line
|
||||
// count has already changed.
|
||||
int b_prev_line_count;
|
||||
|
||||
// array of channel_id:s which have asked to receive updates for this
|
||||
// buffer.
|
||||
kvec_t(uint64_t) update_channels;
|
||||
|
Reference in New Issue
Block a user