aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2015-12-12 18:32:24 +0000
committernicm <nicm>2015-12-12 18:32:24 +0000
commit5ed17e84faed0a7655ec1eb3de291b60839dcb12 (patch)
tree6d6a92930d40c5ca616505ebba40fc5ac4b4d57b /format.c
parent6a50cf89b40d472cd1f8b439913ca4caddbfd001 (diff)
downloadrtmux-5ed17e84faed0a7655ec1eb3de291b60839dcb12.tar.gz
rtmux-5ed17e84faed0a7655ec1eb3de291b60839dcb12.tar.bz2
rtmux-5ed17e84faed0a7655ec1eb3de291b60839dcb12.zip
Add key-table option to set the default key table for a session, allows
different key bindings for different sessions and a few other things.
Diffstat (limited to 'format.c')
-rw-r--r--format.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/format.c b/format.c
index 3e666330..79445936 100644
--- a/format.c
+++ b/format.c
@@ -1035,6 +1035,7 @@ void
format_defaults_client(struct format_tree *ft, struct client *c)
{
struct session *s;
+ const char *name;
if (ft->s == NULL)
ft->s = c->session;
@@ -1052,7 +1053,8 @@ format_defaults_client(struct format_tree *ft, struct client *c)
format_add_tv(ft, "client_created", &c->creation_time);
format_add_tv(ft, "client_activity", &c->activity_time);
- if (strcmp(c->keytable->name, "root") == 0)
+ name = server_client_get_key_table(c);
+ if (strcmp(c->keytable->name, name) == 0)
format_add(ft, "client_prefix", "%d", 0);
else
format_add(ft, "client_prefix", "%d", 1);