Fixed a bunch of problems. Fixed left+click not allowing for square selections, fixed esc not exiting multicursor mode, and allowed cntrl+click to remove a cursor.

This commit is contained in:
Adam Harrison
2022-03-17 16:55:52 -04:00
parent 120c769e7e
commit 82325b6a08
3 changed files with 22 additions and 10 deletions
+6
View File
@@ -198,6 +198,12 @@ function Doc:add_selection(line1, col1, line2, col2, swap)
self:set_selections(target, line1, col1, line2, col2, swap, 0)
end
function Doc:remove_selection(idx)
common.splice(self.selections, (idx - 1) * 4 + 1, 4)
end
function Doc:set_selection(line1, col1, line2, col2, swap)
self.selections = {}
self:set_selections(1, line1, col1, line2, col2, swap)