diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2018-09-11 17:31:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2018-09-11 17:31:02 +0000 |
commit | 766ef5b7355b2619ecfcba02a2a2d3b3b9e882a9 (patch) | |
tree | 6981b3413f6fa60d036dddadcf65b7ee3f5f14aa /usr.bin/tmux/tty.c | |
parent | 79e57a547173675e523dbce5cb44655744f7accf (diff) |
The cursor position is limited to the margins for CUF and CUB, so turn
margins off for printing cells (like most everything else already
does). Problem reported by Thomas Sattler.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 26dd95ee68f..1fb1551de9a 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.305 2018/08/19 16:45:03 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.306 2018/09/11 17:31:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1401,13 +1401,12 @@ tty_cmd_alignmenttest(struct tty *tty, const struct tty_ctx *ctx) void tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx) { - if (ctx->xoff + ctx->ocx > tty->sx - 1 && ctx->ocy == ctx->orlower) { - if (tty_pane_full_width(tty, ctx)) - tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); - else - tty_margin_off(tty); - } + if (ctx->xoff + ctx->ocx > tty->sx - 1 && + ctx->ocy == ctx->orlower && + tty_pane_full_width(tty, ctx)) + tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower); + tty_margin_off(tty); tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy); tty_cell(tty, ctx->cell, ctx->wp); @@ -1416,6 +1415,7 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx) void tty_cmd_cells(struct tty *tty, const struct tty_ctx *ctx) { + tty_margin_off(tty); tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy); tty_attributes(tty, ctx->cell, ctx->wp); |