aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-20 14:59:31 +0000
committernicm <nicm>2020-04-20 14:59:31 +0000
commit2083a6ea2050fb211eab3da0df0ff5a40b4973b4 (patch)
tree48550eab5ba7e22d2b0817d6a164935f09eea5ad /server-client.c
parent135bb1edeeab3faae8001100aa7c173be9aa91e1 (diff)
downloadrtmux-2083a6ea2050fb211eab3da0df0ff5a40b4973b4.tar.gz
rtmux-2083a6ea2050fb211eab3da0df0ff5a40b4973b4.tar.bz2
rtmux-2083a6ea2050fb211eab3da0df0ff5a40b4973b4.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 'server-client.c')
-rw-r--r--server-client.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/server-client.c b/server-client.c
index cd850593..8da55ac0 100644
--- a/server-client.c
+++ b/server-client.c
@@ -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. */