aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-12 00:01:13 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-12 00:01:13 +0000
commit33ebb9ec39e175197b9a7ba7071aeea472f76e8b (patch)
treef7c2f3683db46a9492939b81a742a959330f11de /tty.c
parentd87ab0cadf6ee30f253a815ebc80c14d2818391d (diff)
parent74c40d04eadc40c034634d70925355a0751c1433 (diff)
downloadrtmux-33ebb9ec39e175197b9a7ba7071aeea472f76e8b.tar.gz
rtmux-33ebb9ec39e175197b9a7ba7071aeea472f76e8b.tar.bz2
rtmux-33ebb9ec39e175197b9a7ba7071aeea472f76e8b.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/tty.c b/tty.c
index 23a74255..d1a72599 100644
--- a/tty.c
+++ b/tty.c
@@ -565,9 +565,7 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
if (mode & ALL_MOUSE_MODES) {
/*
* Enable the SGR (1006) extension unconditionally, as
- * this is safe from misinterpretation. Do it in this
- * order, because in some terminals it's the last one
- * that takes effect and SGR is the preferred one.
+ * it is safe from misinterpretation.
*/
tty_puts(tty, "\033[?1006h");
if (mode & MODE_MOUSE_BUTTON)
@@ -1135,13 +1133,12 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
struct screen *s = wp->screen;
u_int cx, width;
- 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);
- else
- tty_region_off(tty);
- tty_margin_off(tty);
+ 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);
+ }
/* Is the cursor in the very last position? */
width = ctx->cell->data.width;