diff options
author | 2020-07-21 05:24:33 +0000 | |
---|---|---|
committer | 2020-07-21 05:24:33 +0000 | |
commit | 6523adaf40d6372ad01dfc58080ef33d68b70165 (patch) | |
tree | 6e5d1bc59cead35acc038e005ab2c539b4dc5002 /usr.bin/tmux/screen-write.c | |
parent | extra garbage line found during archeology (diff) | |
download | wireguard-openbsd-6523adaf40d6372ad01dfc58080ef33d68b70165.tar.xz wireguard-openbsd-6523adaf40d6372ad01dfc58080ef33d68b70165.zip |
Fix show-buffer when run from inside tmux, GitHub issue 2314.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 8ebbea652db..4fc124f127e 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.186 2020/07/06 10:07:02 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.187 2020/07/21 05:24:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -514,7 +514,10 @@ screen_write_vnputs(struct screen_write_ctx *ctx, ssize_t maxlen, if (*ptr == '\001') gc.attr ^= GRID_ATTR_CHARSET; - else if (*ptr > 0x1f && *ptr < 0x7f) { + else if (*ptr == '\n') { + screen_write_linefeed(ctx, 0, 8); + screen_write_carriagereturn(ctx); + } else if (*ptr > 0x1f && *ptr < 0x7f) { size++; screen_write_putc(ctx, &gc, *ptr); } |