aboutsummarylogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel2010-10-31 20:29:22 +0100
committerAurélien Aptel2010-10-31 20:29:22 +0100
commitd75a55849b84af7029cd57a1eadb2217a7c05ab9 (patch)
tree8804dd3bcfc1ef0e529123496c9e3c0b7a173793 /st.c
parent89221bef50d9d881783dbf7b8ca37f19df40f753 (diff)
downloadaur-d75a55849b84af7029cd57a1eadb2217a7c05ab9.tar.gz
fixed ED.
Diffstat (limited to 'st.c')
-rw-r--r--st.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/st.c b/st.c
index ed8e2a875b36..76a2016df1b3 100644
--- a/st.c
+++ b/st.c
@@ -883,10 +883,14 @@ csihandle(void) {
case 'J': /* ED -- Clear screen */
switch(escseq.arg[0]) {
case 0: /* below */
- tclearregion(term.c.x, term.c.y, term.col-1, term.row-1);
+ tclearregion(term.c.x, term.c.y, term.col-1, term.c.y);
+ if(term.c.y < term.row-1)
+ tclearregion(0, term.c.y+1, term.col-1, term.row-1);
break;
case 1: /* above */
- tclearregion(0, 0, term.c.x, term.c.y);
+ if(term.c.y > 1)
+ tclearregion(0, 0, term.col-1, term.c.y-1);
+ tclearregion(0, term.c.y, term.c.x, term.c.y);
break;
case 2: /* all */
tclearregion(0, 0, term.col-1, term.row-1);