summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-02-09 10:09:14 +0000
committernicm <nicm@openbsd.org>2017-02-09 10:09:14 +0000
commit30133c6802fb2c2bf494477526329297c1c4f824 (patch)
tree065b656b5e3604fd4d562c4eef411848b5af6152 /usr.bin/tmux/screen-write.c
parentWhen an ordinary (not collected) cell is received, we need to flush any (diff)
downloadwireguard-openbsd-30133c6802fb2c2bf494477526329297c1c4f824.tar.xz
wireguard-openbsd-30133c6802fb2c2bf494477526329297c1c4f824.zip
Combining characters need a full flush.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r--usr.bin/tmux/screen-write.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index d3cb8c962f7..3ec61426cb3 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.111 2017/02/09 09:33:15 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.112 2017/02/09 10:09:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1153,11 +1153,9 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
return;
ctx->cells++;
- /* Flush any existing scrolling. */
- screen_write_collect_flush(ctx, 1);
-
/* If the width is zero, combine onto the previous character. */
if (width == 0) {
+ screen_write_collect_flush(ctx, 0);
if ((gc = screen_write_combine(ctx, &gc->data, &xx)) != 0) {
screen_write_cursormove(ctx, xx, s->cy);
screen_write_initctx(ctx, &ttyctx);
@@ -1167,6 +1165,9 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
return;
}
+ /* Flush any existing scrolling. */
+ screen_write_collect_flush(ctx, 1);
+
/* If this character doesn't fit, ignore it. */
if ((~s->mode & MODE_WRAP) &&
width > 1 &&