From db3643653eb79befc9334ac355c17fce6552b860 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sat, 2 Oct 2021 20:01:23 +0200 Subject: [PATCH] Sanitize selections after redo --- data/core/doc/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/core/doc/init.lua b/data/core/doc/init.lua index aff31e94..26af4732 100644 --- a/data/core/doc/init.lua +++ b/data/core/doc/init.lua @@ -301,7 +301,8 @@ local function pop_undo(self, undo_stack, redo_stack, modified) local line1, col1, line2, col2 = table.unpack(cmd) self:raw_remove(line1, col1, line2, col2, redo_stack, cmd.time) elseif cmd.type == "selection" then - self.selections = { unpack(cmd) } + self.selections = { table.unpack(cmd) } + self:sanitize_selection() end modified = modified or (cmd.type ~= "selection")