mirror of
https://github.com/tmux/tmux.git
synced 2026-02-14 01:59:18 +00:00
Add -e flag to command-prompt to close if empty, from Dane Jensen in
GitHub issue 4812.
This commit is contained in:
5
status.c
5
status.c
@@ -1383,6 +1383,11 @@ process_key:
|
||||
break;
|
||||
case KEYC_BSPACE:
|
||||
case 'h'|KEYC_CTRL:
|
||||
if (c->prompt_flags & PROMPT_BSPACE_EXIT && size == 0) {
|
||||
if (c->prompt_inputcb(c, c->prompt_data, NULL, 1) == 0)
|
||||
status_prompt_clear(c);
|
||||
break;
|
||||
}
|
||||
if (c->prompt_index != 0) {
|
||||
if (c->prompt_index == size)
|
||||
c->prompt_buffer[--c->prompt_index].size = 0;
|
||||
|
||||
Reference in New Issue
Block a user