Keymap.
This commit is contained in:
parent
6bdcfc824d
commit
1968d31b7c
|
@ -405,12 +405,14 @@ local commands = {
|
||||||
|
|
||||||
["doc:set-cursor-word"] = function(x, y, clicks)
|
["doc:set-cursor-word"] = function(x, y, clicks)
|
||||||
local line, col = dv():resolve_screen_position(x, y)
|
local line, col = dv():resolve_screen_position(x, y)
|
||||||
|
doc():set_selection(line, col, line, col)
|
||||||
command.perform("doc:select-word")
|
command.perform("doc:select-word")
|
||||||
dv().mouse_selecting = { line, col }
|
dv().mouse_selecting = { line, col }
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["doc:set-cursor-line"] = function(x, y, clicks)
|
["doc:set-cursor-line"] = function(x, y, clicks)
|
||||||
local line, col = dv():resolve_screen_position(x, y)
|
local line, col = dv():resolve_screen_position(x, y)
|
||||||
|
doc():set_selection(line, col, line, col)
|
||||||
command.perform("doc:select-lines")
|
command.perform("doc:select-lines")
|
||||||
dv().mouse_selecting = { line, col }
|
dv().mouse_selecting = { line, col }
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -96,8 +96,8 @@ local function keymap_macos(keymap)
|
||||||
["shift+lclick"] = "doc:select-to-cursor",
|
["shift+lclick"] = "doc:select-to-cursor",
|
||||||
["ctrl+lclick"] = "doc:split-cursor",
|
["ctrl+lclick"] = "doc:split-cursor",
|
||||||
["lclick"] = "doc:set-cursor",
|
["lclick"] = "doc:set-cursor",
|
||||||
["dlclick"] = "doc:select-word",
|
["dlclick"] = "doc:set-cursor-word",
|
||||||
["tlclick"] = "doc:select-lines",
|
["tlclick"] = "doc:set-cursor-line",
|
||||||
["shift+left"] = "doc:select-to-previous-char",
|
["shift+left"] = "doc:select-to-previous-char",
|
||||||
["shift+right"] = "doc:select-to-next-char",
|
["shift+right"] = "doc:select-to-next-char",
|
||||||
["shift+up"] = "doc:select-to-previous-line",
|
["shift+up"] = "doc:select-to-previous-line",
|
||||||
|
|
Loading…
Reference in New Issue