=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-switch-client.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- src/usr.bin/tmux/cmd-switch-client.c 2020/04/13 20:51:57 1.65 +++ src/usr.bin/tmux/cmd-switch-client.c 2020/05/16 15:45:29 1.66 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-switch-client.c,v 1.65 2020/04/13 20:51:57 nicm Exp $ */ +/* $OpenBSD: cmd-switch-client.c,v 1.66 2020/05/16 15:45:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -34,7 +34,7 @@ .name = "switch-client", .alias = "switchc", - .args = { "lc:Enpt:rT:Z", 0, 0 }, + .args = { "lc:EFnpt:rT:Z", 0, 0 }, .usage = "[-ElnprZ] [-c target-client] [-t target-session] " "[-T key-table]", @@ -74,8 +74,12 @@ wl = target.wl; wp = target.wp; - if (args_has(args, 'r')) - tc->flags ^= CLIENT_READONLY; + if (args_has(args, 'r')) { + if (tc->flags & CLIENT_READONLY) + tc->flags &= ~(CLIENT_READONLY|CLIENT_IGNORESIZE); + else + tc->flags |= (CLIENT_READONLY|CLIENT_IGNORESIZE); + } tablename = args_get(args, 'T'); if (tablename != NULL) {