Open INSSRumia opened 1 month ago
I reproduced the same behavior..
I determined the cause: it lies in a function that updates the mark position in finishCurrentStep. This update is necessary when the marked line is affected by edits to surrounding lines.
Typically, a new mark is added to the current history step in the undoStack, and its isFinished property is expected to be true. However, during macro replay, the isFinished property remains false because all operations within the re cording macro should be combined into a single step in the undoStack. As a result, the property stays false, triggering the execution of the finishCurrentStep method....
Describe the bug
If I use
yy
command to yank some lines, then I usep
(paste) andm
(mark) commands in macro, such aspma
.When I play marco, the mark
a
will be set at the end of next line of paste content.To Reproduce
Steps to reproduce the behavior:
2yy
command to yank thepaste line ******
.line 1 **********
.qapmaq
in normal mode.paste line ** paste line **
line 1 ** paste line ** paste line ** line 2 ** paste line ** paste line ** line 3 ** <-- Mark a at end of this line.
paste line ** paste line **