mirror of
https://github.com/tmux/tmux.git
synced 2025-04-10 11:08:49 +00:00
Fix wrapping after origin mode change.
This commit is contained in:
parent
3f0efc050a
commit
303d20a758
@ -75,7 +75,7 @@ screen_write_set_cursor(struct screen_write_ctx *ctx, int cx, int cy)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (cx != -1) {
|
if (cx != -1) {
|
||||||
if ((u_int)cx > screen_size_x(s) - 1)
|
if ((u_int)cx > screen_size_x(s)) /* allow last column */
|
||||||
cx = screen_size_x(s) - 1;
|
cx = screen_size_x(s) - 1;
|
||||||
s->cx = cx;
|
s->cx = cx;
|
||||||
}
|
}
|
||||||
@ -1045,6 +1045,11 @@ screen_write_cursormove(struct screen_write_ctx *ctx, u_int px, u_int py)
|
|||||||
py += s->rupper;
|
py += s->rupper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (px > screen_size_x(s) - 1)
|
||||||
|
px = screen_size_x(s) - 1;
|
||||||
|
if (py > screen_size_y(s) - 1)
|
||||||
|
py = screen_size_y(s) - 1;
|
||||||
|
|
||||||
screen_write_set_cursor(ctx, px, py);
|
screen_write_set_cursor(ctx, px, py);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user