mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 09:58:52 +00:00
Handle empty strings as escape.
This commit is contained in:
parent
6d9eaa6440
commit
471e37659f
11
status.c
11
status.c
@ -1,4 +1,4 @@
|
||||
/* $Id: status.c,v 1.33 2008-06-19 20:48:48 nicm Exp $ */
|
||||
/* $Id: status.c,v 1.34 2008-06-19 20:53:04 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -413,9 +413,12 @@ status_prompt_key(struct client *c, int key)
|
||||
}
|
||||
break;
|
||||
case '\r': /* enter */
|
||||
c->prompt_callback(c->prompt_data, c->prompt_buffer);
|
||||
server_clear_client_prompt(c);
|
||||
break;
|
||||
if (*c->prompt_buffer != '\0') {
|
||||
c->prompt_callback(c->prompt_data, c->prompt_buffer);
|
||||
server_clear_client_prompt(c);
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case '\e': /* escape */
|
||||
c->prompt_callback(c->prompt_data, NULL);
|
||||
server_clear_client_prompt(c);
|
||||
|
Loading…
Reference in New Issue
Block a user