aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2018-09-11 17:31:01 +0000
committernicm <nicm>2018-09-11 17:31:01 +0000
commitbe2201200f21c074b35c9c31034b7bdf6cd76721 (patch)
tree638551cfe5fd1352ef3656262ce3d3165c86bc4a
parentbd9133b31d1a66d2ea1c6dd893dcd35903a306b9 (diff)
downloadrtmux-be2201200f21c074b35c9c31034b7bdf6cd76721.tar.gz
rtmux-be2201200f21c074b35c9c31034b7bdf6cd76721.tar.bz2
rtmux-be2201200f21c074b35c9c31034b7bdf6cd76721.zip
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.
-rw-r--r--tty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tty.c b/tty.c
index 2397f8c4..b6dd3403 100644
--- a/tty.c
+++ b/tty.c
@@ -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);