aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-07-03 23:02:02 -0400
committerJames McCoy <jamessan@jamessan.com>2020-11-16 18:52:16 -0500
commite62beab71972bd30a56fe48766d8eb5e691c5cad (patch)
treecc7582198c3a4b27284fd7ac976554f92fe3bbe3 /src
parentdd48198e62a06c95ec98cdf3f4296c8e5f539550 (diff)
downloadrneovim-e62beab71972bd30a56fe48766d8eb5e691c5cad.tar.gz
rneovim-e62beab71972bd30a56fe48766d8eb5e691c5cad.tar.bz2
rneovim-e62beab71972bd30a56fe48766d8eb5e691c5cad.zip
Understand Escape as another name for Esc
This allows us to remove special-case handling of Esc in forward_modified_utf8(), which was always sending "<Esc>" to nvim even when there were modifiers present. Closes #12584
Diffstat (limited to 'src')
-rw-r--r--src/nvim/keymap.c1
-rw-r--r--src/nvim/tui/input.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/keymap.c b/src/nvim/keymap.c
index 2b6f022d9d..b53a0d3e0b 100644
--- a/src/nvim/keymap.c
+++ b/src/nvim/keymap.c
@@ -156,6 +156,7 @@ static const struct key_name_entry {
{ K_BS, "BS" },
{ K_BS, "BackSpace" }, // Alternative name
{ ESC, "Esc" },
+ { ESC, "Escape" }, // Alternative name
{ CSI, "CSI" },
{ K_CSI, "xCSI" },
{ '|', "Bar" },
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index bbee7e4712..cc04920b32 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -198,9 +198,6 @@ static void forward_modified_utf8(TermInput *input, TermKeyKey *key)
char buf[64];
if (key->type == TERMKEY_TYPE_KEYSYM
- && key->code.sym == TERMKEY_SYM_ESCAPE) {
- len = (size_t)snprintf(buf, sizeof(buf), "<Esc>");
- } else if (key->type == TERMKEY_TYPE_KEYSYM
&& key->code.sym == TERMKEY_SYM_SUSPEND) {
len = (size_t)snprintf(buf, sizeof(buf), "<C-Z>");
} else {