aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-11-16 14:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2016-11-16 14:01:11 +0000
commit759953cb8d6e8ac2e95f831a320f249a5258d5a9 (patch)
tree0f043cf96088365b250f0bf749b3b02a1f1fc3de /tty.c
parent06fd3b00ff23566dd683abe4f3d7d1581a4fe8b8 (diff)
parentddf7ac5ae4d044cda12d959bbf02df921f9d84a5 (diff)
downloadrtmux-759953cb8d6e8ac2e95f831a320f249a5258d5a9.tar.gz
rtmux-759953cb8d6e8ac2e95f831a320f249a5258d5a9.tar.bz2
rtmux-759953cb8d6e8ac2e95f831a320f249a5258d5a9.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 6fade4c9..c217b0ff 100644
--- a/tty.c
+++ b/tty.c
@@ -1004,7 +1004,7 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx)
* off the edge - if so, move the cursor back to the right.
*/
if (ctx->xoff + ctx->ocx > tty->rright)
- tty_cursor(tty, tty->rright, ctx->yoff + ctx->ocy);
+ tty_cursor(tty, tty->rright, tty->rlower);
else
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
@@ -1134,8 +1134,12 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
struct screen *s = wp->screen;
u_int cx, width;
- if (ctx->ocy == ctx->orlower)
+ if (ctx->xoff + ctx->ocx > tty->sx - 1 &&
+ ctx->yoff + ctx->ocy == ctx->orlower &&
+ tty_pane_full_width(tty, ctx))
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
+ else
+ tty_region_off(tty);
tty_margin_off(tty);
/* Is the cursor in the very last position? */