From bded7437064c76dd6cf4e76e558d826859adcc79 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Apr 2015 15:34:56 +0000 Subject: Support for multiple key tables to commands to be bound to sequences of keys. The default key bindings become the "prefix" table and -n the "root" table. Keys may be bound in new tables with bind -T and switch-client -T used to specify the table in which the next key should be looked up. Based on a diff from Keith Amling. --- format.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'format.c') diff --git a/format.c b/format.c index cf1713ba..eb4664d1 100644 --- a/format.c +++ b/format.c @@ -545,7 +545,11 @@ format_defaults_client(struct format_tree *ft, struct client *c) format_add(ft, "client_activity", "%lld", (long long) t); format_add(ft, "client_activity_string", "%s", format_time_string(t)); - format_add(ft, "client_prefix", "%d", !!(c->flags & CLIENT_PREFIX)); + if (strcmp(c->keytable->name, "root") == 0) + format_add(ft, "client_prefix", "%d", 0); + else + format_add(ft, "client_prefix", "%d", 1); + format_add(ft, "client_key_table", "%s", c->keytable->name); if (c->tty.flags & TTY_UTF8) format_add(ft, "client_utf8", "%d", 1); -- cgit From 1f404f6a23969516007c77eeec89876154c9a4a4 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 21 Apr 2015 15:18:38 +0000 Subject: Put mouse_any_flag back, don't know where it went to (still in man page). --- format.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'format.c') diff --git a/format.c b/format.c index eb4664d1..2be9834f 100644 --- a/format.c +++ b/format.c @@ -729,6 +729,8 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "wrap_flag", "%d", !!(wp->base.mode & MODE_WRAP)); + format_add(ft, "mouse_any_flag", "%d", + !!(wp->base.mode & (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON))); format_add(ft, "mouse_standard_flag", "%d", !!(wp->base.mode & MODE_MOUSE_STANDARD)); format_add(ft, "mouse_button_flag", "%d", -- cgit From 69f292a90e2fb9d48a77a9753127da13554715de Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 21 Apr 2015 22:38:49 +0000 Subject: Always format real layout even when zoomed. --- format.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'format.c') diff --git a/format.c b/format.c index 2be9834f..7ded05d2 100644 --- a/format.c +++ b/format.c @@ -577,7 +577,10 @@ format_defaults_window(struct format_tree *ft, struct window *w) ft->w = w; - layout = layout_dump(w); + if (w->saved_layout_root != NULL) + layout = layout_dump(w->saved_layout_root); + else + layout = layout_dump(w->layout_root); format_add(ft, "window_id", "@%u", w->id); format_add(ft, "window_name", "%s", w->name); -- cgit