Fix logical error in on_text_change
This commit is contained in:
parent
e43c980e4a
commit
3721ace099
|
@ -262,11 +262,13 @@ local function pop_undo(self, undo_stack, redo_stack, modified)
|
||||||
self.selection.b.line, self.selection.b.col = cmd[3], cmd[4]
|
self.selection.b.line, self.selection.b.col = cmd[3], cmd[4]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
modified = modified or (cmd.type ~= "selection")
|
||||||
|
|
||||||
-- if next undo command is within the merge timeout then treat as a single
|
-- if next undo command is within the merge timeout then treat as a single
|
||||||
-- command and continue to execute it
|
-- command and continue to execute it
|
||||||
local next = undo_stack[undo_stack.idx - 1]
|
local next = undo_stack[undo_stack.idx - 1]
|
||||||
if next and math.abs(cmd.time - next.time) < config.undo_merge_timeout then
|
if next and math.abs(cmd.time - next.time) < config.undo_merge_timeout then
|
||||||
return pop_undo(self, undo_stack, redo_stack, modified or cmd.type ~= "selection")
|
return pop_undo(self, undo_stack, redo_stack, modified)
|
||||||
end
|
end
|
||||||
|
|
||||||
if modified then
|
if modified then
|
||||||
|
|
Loading…
Reference in New Issue