mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Invalidate the cursor when we think we should have wrapped.
This commit is contained in:
6
tty.c
6
tty.c
@ -476,6 +476,9 @@ void
|
|||||||
tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)
|
tty_putn(struct tty *tty, const void *buf, size_t len, u_int width)
|
||||||
{
|
{
|
||||||
tty_add(tty, buf, len);
|
tty_add(tty, buf, len);
|
||||||
|
if (tty->cx + width > tty->sx)
|
||||||
|
tty->cx = tty->cy = UINT_MAX;
|
||||||
|
else
|
||||||
tty->cx += width;
|
tty->cx += width;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1403,7 +1406,8 @@ tty_cursor_pane_unless_wrap(struct tty *tty, const struct tty_ctx *ctx,
|
|||||||
(tty->term->flags & TERM_EARLYWRAP) ||
|
(tty->term->flags & TERM_EARLYWRAP) ||
|
||||||
ctx->xoff + cx != 0 ||
|
ctx->xoff + cx != 0 ||
|
||||||
ctx->yoff + cy != tty->cy + 1 ||
|
ctx->yoff + cy != tty->cy + 1 ||
|
||||||
tty->cx < tty->sx)
|
tty->cx < tty->sx ||
|
||||||
|
tty->cy == tty->rlower)
|
||||||
tty_cursor_pane(tty, ctx, cx, cy);
|
tty_cursor_pane(tty, ctx, cx, cy);
|
||||||
else
|
else
|
||||||
log_debug("%s: will wrap at %u,%u", __func__, tty->cx, tty->cy);
|
log_debug("%s: will wrap at %u,%u", __func__, tty->cx, tty->cy);
|
||||||
|
Reference in New Issue
Block a user