aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2021-01-18 10:27:54 +0000
committernicm <nicm>2021-01-18 10:27:54 +0000
commit91d112bf12789da07e25ed001f7961b1d6bd7a76 (patch)
treeab49fb6c0c384221466c910061afc622e1e59231 /tty.c
parent71c590a37f98d82c72279eddae74f9b8be146202 (diff)
downloadrtmux-91d112bf12789da07e25ed001f7961b1d6bd7a76.tar.gz
rtmux-91d112bf12789da07e25ed001f7961b1d6bd7a76.tar.bz2
rtmux-91d112bf12789da07e25ed001f7961b1d6bd7a76.zip
There is no need to clear every line entirely before drawing to it, this
means moving the cursor and messes up wrapping. Better to just clear the sections that aren't written over. GitHub issue 2537.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/tty.c b/tty.c
index fac7a99e..279bafaf 100644
--- a/tty.c
+++ b/tty.c
@@ -1531,20 +1531,9 @@ tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx)
void
tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
{
- if (ctx->bigger) {
- tty_draw_pane(tty, ctx, ctx->ocy);
- return;
- }
-
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg);
- tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
-
- if (tty_term_has(tty->term, TTYC_ECH) &&
- !tty_fake_bce(tty, &ctx->defaults, 8))
- tty_putcode1(tty, TTYC_ECH, ctx->num);
- else
- tty_repeat_space(tty, ctx->num);
+ tty_clear_pane_line(tty, ctx, ctx->ocy, ctx->ocx, ctx->num, ctx->bg);
}
void