=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.329 retrieving revision 1.330 diff -c -r1.329 -r1.330 *** src/usr.bin/tmux/server-client.c 2020/04/20 13:25:36 1.329 --- src/usr.bin/tmux/server-client.c 2020/04/20 14:59:31 1.330 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.329 2020/04/20 13:25:36 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.330 2020/04/20 14:59:31 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 1541,1547 **** struct window_pane *wp = w->active, *loop; struct screen *s; struct options *oo = c->session->options; ! int mode, cursor; u_int cx = 0, cy = 0, ox, oy, sx, sy; if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) --- 1541,1547 ---- struct window_pane *wp = w->active, *loop; struct screen *s; struct options *oo = c->session->options; ! int mode, cursor, flags; u_int cx = 0, cy = 0, ox, oy, sx, sy; if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) *************** *** 1606,1611 **** --- 1606,1621 ---- /* 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. */