Rebased, and added the ability for ctrl to just create new cursors.

This commit is contained in:
Adam Harrison
2021-06-18 17:33:55 -04:00
parent 292c98935c
commit 704e04396f
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -256,7 +256,11 @@ function DocView:on_mouse_pressed(button, x, y, clicks)
end
else
local line, col = self:resolve_screen_position(x, y)
self.doc:set_selection(mouse_selection(self.doc, clicks, line, col, line, col))
if keymap.modkeys["ctrl"] then
self.doc:add_selection(mouse_selection(self.doc, clicks, line, col, line, col))
else
self.doc:set_selection(mouse_selection(self.doc, clicks, line, col, line, col))
end
self.mouse_selecting = { line, col, clicks = clicks }
end
core.blink_reset()