summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-client.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-20 14:59:31 +0000
committernicm <nicm@openbsd.org>2020-04-20 14:59:31 +0000
commit5fd0910874ae195a30cc5ac527a458d26a86acf3 (patch)
tree80d187fbafbab8f15ddab350d9f8d7911b83a2e8 /usr.bin/tmux/server-client.c
parentChange the Sync capability to be a string instead of a flag. (diff)
downloadwireguard-openbsd-5fd0910874ae195a30cc5ac527a458d26a86acf3.tar.xz
wireguard-openbsd-5fd0910874ae195a30cc5ac527a458d26a86acf3.zip
Change how sync works to always send the end sequence after all output
is done when we are returning to the event loop (since we always move the cursor at that point). Also a man fix from jmc.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r--usr.bin/tmux/server-client.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index ad218fecd38..aef0261b44e 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.329 2020/04/20 13:25:36 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.330 2020/04/20 14:59:31 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1541,7 +1541,7 @@ server_client_reset_state(struct client *c)
struct window_pane *wp = w->active, *loop;
struct screen *s;
struct options *oo = c->session->options;
- int mode, cursor;
+ int mode, cursor, flags;
u_int cx = 0, cy = 0, ox, oy, sx, sy;
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
@@ -1606,6 +1606,16 @@ server_client_reset_state(struct client *c)
/* Set the terminal mode and reset attributes. */
tty_update_mode(&c->tty, mode, s);
tty_reset(&c->tty);
+
+ /*
+ * All writing must be done, send a sync end (if it was started). It
+ * may have been started by redrawing so needs to go out even if the
+ * block flag is set.
+ */
+ flags = (c->tty.flags & TTY_BLOCK);
+ c->tty.flags &= ~TTY_BLOCK;
+ tty_sync_end(&c->tty);
+ c->tty.flags |= flags;
}
/* Repeat time callback. */