diff --git a/status.c b/status.c index 0551b547..3cda11fb 100644 --- a/status.c +++ b/status.c @@ -936,6 +936,8 @@ status_prompt_translate_key(struct client *c, key_code key, key_code *new_key) return (1); case '\033': /* Escape */ c->prompt_mode = PROMPT_COMMAND; + if (c->prompt_index != 0) + c->prompt_index--; c->flags |= CLIENT_REDRAWSTATUS; return (0); } @@ -961,10 +963,11 @@ status_prompt_translate_key(struct client *c, key_code key, key_code *new_key) *new_key = 'u'|KEYC_CTRL; return (1); case 'i': - case '\033': /* Escape */ c->prompt_mode = PROMPT_ENTRY; c->flags |= CLIENT_REDRAWSTATUS; return (0); + case '\033': /* Escape */ + return (0); } switch (key) {