Added command `doc:select-none`, added binding to `escape`
This commit is contained in:
parent
885ed5f860
commit
4ca35fe056
|
@ -135,6 +135,11 @@ local commands = {
|
||||||
doc():set_selection(1, 1, math.huge, math.huge)
|
doc():set_selection(1, 1, math.huge, math.huge)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
["doc:select-none"] = function()
|
||||||
|
local line, col = doc():get_selection()
|
||||||
|
doc():set_selection(line, col)
|
||||||
|
end,
|
||||||
|
|
||||||
["doc:select-lines"] = function()
|
["doc:select-lines"] = function()
|
||||||
local line1, _, line2, _, swap = doc():get_selection(true)
|
local line1, _, line2, _, swap = doc():get_selection(true)
|
||||||
append_line_if_last_line(line2)
|
append_line_if_last_line(line2)
|
||||||
|
|
|
@ -127,7 +127,7 @@ keymap.add {
|
||||||
["ctrl+x"] = "doc:cut",
|
["ctrl+x"] = "doc:cut",
|
||||||
["ctrl+c"] = "doc:copy",
|
["ctrl+c"] = "doc:copy",
|
||||||
["ctrl+v"] = "doc:paste",
|
["ctrl+v"] = "doc:paste",
|
||||||
["escape"] = { "command:escape" },
|
["escape"] = { "command:escape", "doc:select-none" },
|
||||||
["tab"] = { "command:complete", "doc:indent" },
|
["tab"] = { "command:complete", "doc:indent" },
|
||||||
["shift+tab"] = "doc:unindent",
|
["shift+tab"] = "doc:unindent",
|
||||||
["backspace"] = "doc:backspace",
|
["backspace"] = "doc:backspace",
|
||||||
|
|
Loading…
Reference in New Issue