diff --git a/data/core/commands/doc.lua b/data/core/commands/doc.lua index c62f92c..90c0675 100644 --- a/data/core/commands/doc.lua +++ b/data/core/commands/doc.lua @@ -135,6 +135,11 @@ local commands = { doc():set_selection(1, 1, math.huge, math.huge) end, + ["doc:select-none"] = function() + local line, col = doc():get_selection() + doc():set_selection(line, col) + end, + ["doc:select-lines"] = function() local line1, _, line2, _, swap = doc():get_selection(true) append_line_if_last_line(line2) diff --git a/data/core/keymap.lua b/data/core/keymap.lua index e3ec74c..24540f1 100644 --- a/data/core/keymap.lua +++ b/data/core/keymap.lua @@ -127,7 +127,7 @@ keymap.add { ["ctrl+x"] = "doc:cut", ["ctrl+c"] = "doc:copy", ["ctrl+v"] = "doc:paste", - ["escape"] = { "command:escape" }, + ["escape"] = { "command:escape", "doc:select-none" }, ["tab"] = { "command:complete", "doc:indent" }, ["shift+tab"] = "doc:unindent", ["backspace"] = "doc:backspace",