mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Allow multiple modes to be open in a pane. A stack of open modes is kept
and the previous restored when the top is exited. If a mode that is already on the stack is entered, the existing instance is moved to the top as the active mode rather than being opened new.
This commit is contained in:
@ -921,18 +921,18 @@ server_client_assume_paste(struct session *s)
|
||||
void
|
||||
server_client_handle_key(struct client *c, key_code key)
|
||||
{
|
||||
struct mouse_event *m = &c->tty.mouse;
|
||||
struct session *s = c->session;
|
||||
struct winlink *wl;
|
||||
struct window *w;
|
||||
struct window_pane *wp;
|
||||
struct timeval tv;
|
||||
struct key_table *table, *first;
|
||||
const char *tablename;
|
||||
struct key_binding *bd;
|
||||
int xtimeout, flags;
|
||||
struct cmd_find_state fs;
|
||||
key_code key0;
|
||||
struct mouse_event *m = &c->tty.mouse;
|
||||
struct session *s = c->session;
|
||||
struct winlink *wl;
|
||||
struct window *w;
|
||||
struct window_pane *wp;
|
||||
struct window_mode_entry *wme;
|
||||
struct timeval tv;
|
||||
struct key_table *table, *first;
|
||||
struct key_binding *bd;
|
||||
int xtimeout, flags;
|
||||
struct cmd_find_state fs;
|
||||
key_code key0;
|
||||
|
||||
/* Check the client is good to accept input. */
|
||||
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0)
|
||||
@ -1009,11 +1009,9 @@ server_client_handle_key(struct client *c, key_code key)
|
||||
*/
|
||||
if (server_client_is_default_key_table(c, c->keytable) &&
|
||||
wp != NULL &&
|
||||
wp->mode != NULL &&
|
||||
wp->mode->mode->key_table != NULL) {
|
||||
tablename = wp->mode->mode->key_table(wp->mode);
|
||||
table = key_bindings_get_table(tablename, 1);
|
||||
}
|
||||
(wme = TAILQ_FIRST(&wp->modes)) != NULL &&
|
||||
wme->mode->key_table != NULL)
|
||||
table = key_bindings_get_table(wme->mode->key_table(wme), 1);
|
||||
else
|
||||
table = c->keytable;
|
||||
first = table;
|
||||
|
Reference in New Issue
Block a user