mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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.
This commit is contained in:
13
tty.c
13
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
|
||||
|
Reference in New Issue
Block a user