mirror of
https://github.com/tmux/tmux.git
synced 2025-12-25 02:16:15 +00:00
With status-keys vi, move the cursor left by one when pressing Escape to
enter command mode, like vi. GitHub issue 4767 from Joshua Cooper.
This commit is contained in:
5
status.c
5
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) {
|
||||
|
||||
Reference in New Issue
Block a user