clean up Drawing.before after creating undo event
This isn't a bug here, but it led to a bug in lines 2.
This commit is contained in:
parent
a8158f9717
commit
5c8e3e96c8
1
edit.lua
1
edit.lua
|
@ -184,6 +184,7 @@ function edit.draw(State)
|
|||
State.cursor1.line = State.cursor1.line+1
|
||||
end
|
||||
record_undo_event(State, {before=Drawing.before, after=snapshot(State, line_index-1, line_index+1)})
|
||||
Drawing.before = nil
|
||||
schedule_save(State)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -190,6 +190,7 @@ function edit.draw(State, hide_cursor, show_line_numbers)
|
|||
State.cursor1.line = State.cursor1.line+1
|
||||
end
|
||||
record_undo_event(State, {before=Drawing.before, after=snapshot(State, line_index-1, line_index+1)})
|
||||
Drawing.before = nil
|
||||
schedule_save(State)
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue