mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 09:28:51 +00:00
Can scroll away full lines to clear them too.
This commit is contained in:
parent
f688653710
commit
0264ef094a
13
tty.c
13
tty.c
@ -830,12 +830,25 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Full lines can be scrolled away to clear them. */
|
||||||
|
if (px == 0 &&
|
||||||
|
px + nx > tty->sx &&
|
||||||
|
ny > 2 &&
|
||||||
|
tty_term_has(tty->term, TTYC_CSR) &&
|
||||||
|
tty_term_has(tty->term, TTYC_INDN)) {
|
||||||
|
tty_region(tty, py, py + ny - 1);
|
||||||
|
tty_margin_off(tty);
|
||||||
|
tty_putcode1(tty, TTYC_INDN, ny);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If margins are supported, can just scroll the area off to
|
* If margins are supported, can just scroll the area off to
|
||||||
* clear it.
|
* clear it.
|
||||||
*/
|
*/
|
||||||
if (nx > 2 &&
|
if (nx > 2 &&
|
||||||
ny > 2 &&
|
ny > 2 &&
|
||||||
|
tty_term_has(tty->term, TTYC_CSR) &&
|
||||||
tty_use_margin(tty) &&
|
tty_use_margin(tty) &&
|
||||||
tty_term_has(tty->term, TTYC_INDN)) {
|
tty_term_has(tty->term, TTYC_INDN)) {
|
||||||
tty_region(tty, py, py + ny - 1);
|
tty_region(tty, py, py + ny - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user