summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Rinne <markus.ka.rinne@gmail.com>2024-11-25 13:31:56 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2024-12-06 13:42:50 +0100
commit6009e6e25bdff9548f085e9ae562b1ca305d3a0b (patch)
treeebd067b5edc51f4a45cb2eccf84e4fdaa9dc25b5
parentfix BadMatch error when embedding on some windows (diff)
downloadst-6009e6e25bdff9548f085e9ae562b1ca305d3a0b.tar.gz
st-6009e6e25bdff9548f085e9ae562b1ca305d3a0b.zip
Clear screen: Fix edge case
With sequence \e[1J, if cursor is on second line, clear the first line.
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index 57c6e96..2e3800e 100644
--- a/st.c
+++ b/st.c
@@ -1705,7 +1705,7 @@ csihandle(void)
1705 } 1705 }
1706 break; 1706 break;
1707 case 1: /* above */ 1707 case 1: /* above */
1708 if (term.c.y > 1) 1708 if (term.c.y > 0)
1709 tclearregion(0, 0, term.col-1, term.c.y-1); 1709 tclearregion(0, 0, term.col-1, term.c.y-1);
1710 tclearregion(0, term.c.y, term.c.x, term.c.y); 1710 tclearregion(0, term.c.y, term.c.x, term.c.y);
1711 break; 1711 break;