1
0
mirror of git://git.suckless.org/st synced 2025-02-05 05:11:58 +00:00

Clear screen: Fix edge case

With sequence \e[1J, if cursor is on second line, clear the first line.
This commit is contained in:
Markus Rinne 2024-11-25 13:31:56 +02:00 committed by Hiltjo Posthuma
parent a0274bc20e
commit 6009e6e25b

2
st.c
View File

@ -1705,7 +1705,7 @@ csihandle(void)
}
break;
case 1: /* above */
if (term.c.y > 1)
if (term.c.y > 0)
tclearregion(0, 0, term.col-1, term.c.y-1);
tclearregion(0, term.c.y, term.c.x, term.c.y);
break;