mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Fix some miscalculations when clearing to start of screen: the number of lines
to the cursor is cy not cy - 1, and the current cursor cell should be included.
This commit is contained in:
parent
3f16fcb30a
commit
ebe07c2726
@ -605,11 +605,11 @@ screen_write_clearstartofscreen(struct screen_write_ctx *ctx)
|
|||||||
sx = screen_size_x(s);
|
sx = screen_size_x(s);
|
||||||
|
|
||||||
if (s->cy > 0)
|
if (s->cy > 0)
|
||||||
grid_view_clear(s->grid, 0, 0, sx, s->cy - 1);
|
grid_view_clear(s->grid, 0, 0, sx, s->cy);
|
||||||
if (s->cx > sx - 1)
|
if (s->cx > sx - 1)
|
||||||
grid_view_clear(s->grid, 0, s->cy, sx, 1);
|
grid_view_clear(s->grid, 0, s->cy, sx, 1);
|
||||||
else
|
else
|
||||||
grid_view_clear(s->grid, 0, s->cy, s->cx, 1);
|
grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1);
|
||||||
|
|
||||||
tty_write_cmd(ctx->wp, TTY_CLEARSTARTOFSCREEN);
|
tty_write_cmd(ctx->wp, TTY_CLEARSTARTOFSCREEN);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user