Fix editing after undo not clearing the change id (#1574)
This commit is contained in:
parent
8eacca7ae1
commit
b1a647814f
|
@ -488,6 +488,10 @@ end
|
||||||
|
|
||||||
function Doc:insert(line, col, text)
|
function Doc:insert(line, col, text)
|
||||||
self.redo_stack = { idx = 1 }
|
self.redo_stack = { idx = 1 }
|
||||||
|
-- Reset the clean id when we're pushing something new before it
|
||||||
|
if self:get_change_id() < self.clean_change_id then
|
||||||
|
self.clean_change_id = -1
|
||||||
|
end
|
||||||
line, col = self:sanitize_position(line, col)
|
line, col = self:sanitize_position(line, col)
|
||||||
self:raw_insert(line, col, text, self.undo_stack, system.get_time())
|
self:raw_insert(line, col, text, self.undo_stack, system.get_time())
|
||||||
self:on_text_change("insert")
|
self:on_text_change("insert")
|
||||||
|
|
Loading…
Reference in New Issue