mirror of
https://github.com/neovim/neovim.git
synced 2026-09-02 20:34:06 +00:00
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.