mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
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
This commit is contained in:
@@ -156,6 +156,7 @@ static const struct key_name_entry {
|
|||||||
{ K_BS, "BS" },
|
{ K_BS, "BS" },
|
||||||
{ K_BS, "BackSpace" }, // Alternative name
|
{ K_BS, "BackSpace" }, // Alternative name
|
||||||
{ ESC, "Esc" },
|
{ ESC, "Esc" },
|
||||||
|
{ ESC, "Escape" }, // Alternative name
|
||||||
{ CSI, "CSI" },
|
{ CSI, "CSI" },
|
||||||
{ K_CSI, "xCSI" },
|
{ K_CSI, "xCSI" },
|
||||||
{ '|', "Bar" },
|
{ '|', "Bar" },
|
||||||
|
@@ -198,9 +198,6 @@ static void forward_modified_utf8(TermInput *input, TermKeyKey *key)
|
|||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
if (key->type == TERMKEY_TYPE_KEYSYM
|
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) {
|
&& key->code.sym == TERMKEY_SYM_SUSPEND) {
|
||||||
len = (size_t)snprintf(buf, sizeof(buf), "<C-Z>");
|
len = (size_t)snprintf(buf, sizeof(buf), "<C-Z>");
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user