aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-05 15:42:20 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-05 15:42:20 +0100
commit2f89d2e7d816918e152aacfee85fab45ee2057b9 (patch)
tree98f86226f36a6bf5e1a88bef8ca1d6cdb02612b8 /format.c
parentdeacfedc65e6de6b3f84348d6723ae6f14d097df (diff)
downloadrtmux-2f89d2e7d816918e152aacfee85fab45ee2057b9.tar.gz
rtmux-2f89d2e7d816918e152aacfee85fab45ee2057b9.tar.bz2
rtmux-2f89d2e7d816918e152aacfee85fab45ee2057b9.zip
Change the existing client flags for control mode to apply for any client, use
the same mechanism for the read-only flag and add an ignore-size flag. refresh-client -F has become -f (-F stays for backwards compatibility) and attach-session and switch-client now have -f flags also. A new format "client_flags" lists the flags and is shown by list-clients by default. This separates the read-only flag from "ignore size" behaviour (new ignore-size) flag - both behaviours are useful in different circumstances. attach -r and switchc -r remain and set or toggle both flags together.
Diffstat (limited to 'format.c')
-rw-r--r--format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format.c b/format.c
index 2e599c60..f6adb51d 100644
--- a/format.c
+++ b/format.c
@@ -2671,11 +2671,11 @@ format_defaults_client(struct format_tree *ft, struct client *c)
format_add(ft, "client_utf8", "%d", 1);
else
format_add(ft, "client_utf8", "%d", 0);
-
if (c->flags & CLIENT_READONLY)
format_add(ft, "client_readonly", "%d", 1);
else
format_add(ft, "client_readonly", "%d", 0);
+ format_add(ft, "client_flags", "%s", server_client_get_flags(c));
s = c->session;
if (s != NULL)