This commit is contained in:
Adam Harrison 2021-10-05 22:09:54 -04:00
parent 6bdcfc824d
commit 1968d31b7c
2 changed files with 4 additions and 2 deletions

View File

@ -405,12 +405,14 @@ local commands = {
["doc:set-cursor-word"] = function(x, y, clicks)
local line, col = dv():resolve_screen_position(x, y)
doc():set_selection(line, col, line, col)
command.perform("doc:select-word")
dv().mouse_selecting = { line, col }
end,
["doc:set-cursor-line"] = function(x, y, clicks)
local line, col = dv():resolve_screen_position(x, y)
doc():set_selection(line, col, line, col)
command.perform("doc:select-lines")
dv().mouse_selecting = { line, col }
end,

View File

@ -96,8 +96,8 @@ local function keymap_macos(keymap)
["shift+lclick"] = "doc:select-to-cursor",
["ctrl+lclick"] = "doc:split-cursor",
["lclick"] = "doc:set-cursor",
["dlclick"] = "doc:select-word",
["tlclick"] = "doc:select-lines",
["dlclick"] = "doc:set-cursor-word",
["tlclick"] = "doc:set-cursor-line",
["shift+left"] = "doc:select-to-previous-char",
["shift+right"] = "doc:select-to-next-char",
["shift+up"] = "doc:select-to-previous-line",