diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-08-15 10:13:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-15 10:13:32 -0400 |
| commit | 9cca923ab4f9ddca4b817e989eba546ddba675e1 (patch) | |
| tree | 1d47478ea9348f39a7b127f0b931a224c22eea1c /runtime/lua/vim/range.lua | |
| parent | aef9356e341ed0df10dcbf48cff2c9efb9f0dcd2 (diff) | |
| download | rneovim-9cca923ab4f9ddca4b817e989eba546ddba675e1.tar.gz rneovim-9cca923ab4f9ddca4b817e989eba546ddba675e1.tar.bz2 rneovim-9cca923ab4f9ddca4b817e989eba546ddba675e1.zip | |
fix(extmarks): redo of a mark created during an edit #41324
Problem:
A mark created by `nvim_buf_set_extmark()` while an undo block is open
never comes back on redo.
Analysis:
Undo deletes the text it covers and collapses the range; redo replays
the splices, which re-insert the text but cannot re-expand the mark.
`extmark_set()` records a position only for a mark it moves, not for one
it creates.
Solution:
Record the created position for redo; undo leaves the mark to the splice
replay, since it did not exist before the edit. Each side of a paired
mark gets its own entry. Redo also revives a mark that undo invalidated,
else its position returns but its highlight does not.
Diffstat (limited to 'runtime/lua/vim/range.lua')
0 files changed, 0 insertions, 0 deletions