summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-refresh-client.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-05-10 16:48:36 +0000
committernicm <nicm@openbsd.org>2017-05-10 16:48:36 +0000
commitd55f3e48dfdc86046947331464533372fd36e9e4 (patch)
tree2fd095a05a95d7e1b5336e613f231c06cd043691 /usr.bin/tmux/cmd-refresh-client.c
parentWe can use ECH to clear sections of lines, so use it for internal panes (diff)
downloadwireguard-openbsd-d55f3e48dfdc86046947331464533372fd36e9e4.tar.xz
wireguard-openbsd-d55f3e48dfdc86046947331464533372fd36e9e4.zip
Prevent control clients from affecting the session size until they have
specified a size with refresh-client -C. Prompted by a different change with the same purpose from George Nachman.
Diffstat (limited to 'usr.bin/tmux/cmd-refresh-client.c')
-rw-r--r--usr.bin/tmux/cmd-refresh-client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-refresh-client.c b/usr.bin/tmux/cmd-refresh-client.c
index 52d3dcb5d1f..c1faf12ceb6 100644
--- a/usr.bin/tmux/cmd-refresh-client.c
+++ b/usr.bin/tmux/cmd-refresh-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-refresh-client.c,v 1.24 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-refresh-client.c,v 1.25 2017/05/10 16:48:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -67,8 +67,10 @@ cmd_refresh_client_exec(struct cmd *self, struct cmdq_item *item)
cmdq_error(item, "not a control client");
return (CMD_RETURN_ERROR);
}
- if (tty_set_size(&c->tty, w, h))
+ if (tty_set_size(&c->tty, w, h)) {
+ c->flags |= CLIENT_SIZECHANGED;
recalculate_sizes();
+ }
} else if (args_has(args, 'S')) {
c->flags |= CLIENT_STATUSFORCE;
server_status_client(c);