core/doc: fix wrong table index in Doc:merge_cursors

it was off by 1
This commit is contained in:
takase1121 2024-06-24 22:21:57 +08:00 committed by Takase
parent 1a293cd42e
commit adb64e6784
1 changed files with 1 additions and 1 deletions

View File

@ -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