From adb64e6784898c0d2b2e747c6e1b650b2c5e458e Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:21:57 +0800 Subject: [PATCH] core/doc: fix wrong table index in Doc:merge_cursors it was off by 1 --- data/core/doc/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/doc/init.lua b/data/core/doc/init.lua index 379a5d18..73342ca1 100644 --- a/data/core/doc/init.lua +++ b/data/core/doc/init.lua @@ -242,7 +242,7 @@ function Doc:set_selection(line1, col1, line2, col2, swap) end function Doc:merge_cursors(idx) - local table_index = idx and (idx - 1) * 4 + local table_index = idx and (idx - 1) * 4 + 1 for i = (table_index or (#self.selections - 3)), (table_index or 5), -4 do for j = 1, i - 4, 4 do if self.selections[i] == self.selections[j] and