summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-02-08 16:18:21 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-02-08 16:18:21 +0000
commitd55daba135fdb54f5374d9f026d5c9c259242fac (patch)
tree0f227afc42a2f55cd3068e9ae518cab1076c33e6
parentb948859d26c1443125d43c04c2056b1fd779cbb4 (diff)
Fix clear start of line.
-rw-r--r--usr.bin/tmux/tty.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 3570f8d719f..44dd42d0ebc 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.237 2017/02/08 15:49:29 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.238 2017/02/08 16:18:20 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -954,14 +954,15 @@ tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx)
tty_default_attributes(tty, wp, ctx->bg);
- tty_cursor_pane(tty, ctx, 0, ctx->ocy);
-
if (ctx->xoff == 0 &&
tty_term_has(tty->term, TTYC_EL1) &&
- !tty_fake_bce(tty, ctx->wp, ctx->bg))
+ !tty_fake_bce(tty, ctx->wp, ctx->bg)) {
+ tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
tty_putcode(tty, TTYC_EL1);
- else
+ } else {
+ tty_cursor_pane(tty, ctx, 0, ctx->ocy);
tty_repeat_space(tty, ctx->ocx + 1);
+ }
}
void