aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-10-31 20:29:22 +0100
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-10-31 20:29:22 +0100
commit4569bab9c2fd59c93263a23caf71442d4b0934a4 (patch)
treeef53bb466b195775160fde1b6299a897075e1db4
parentea4d528fb9b148ba63bc5034d649c11110fd71a1 (diff)
downloadst-patched-4569bab9c2fd59c93263a23caf71442d4b0934a4.tar.bz2
st-patched-4569bab9c2fd59c93263a23caf71442d4b0934a4.tar.xz
st-patched-4569bab9c2fd59c93263a23caf71442d4b0934a4.zip
fixed ED.
-rw-r--r--st.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/st.c b/st.c
index ed8e2a8..76a2016 100644
--- a/st.c
+++ b/st.c
@@ -883,10 +883,14 @@ csihandle(void) {
883 case 'J': /* ED -- Clear screen */ 883 case 'J': /* ED -- Clear screen */
884 switch(escseq.arg[0]) { 884 switch(escseq.arg[0]) {
885 case 0: /* below */ 885 case 0: /* below */
886 tclearregion(term.c.x, term.c.y, term.col-1, term.row-1); 886 tclearregion(term.c.x, term.c.y, term.col-1, term.c.y);
887 if(term.c.y < term.row-1)
888 tclearregion(0, term.c.y+1, term.col-1, term.row-1);
887 break; 889 break;
888 case 1: /* above */ 890 case 1: /* above */
889 tclearregion(0, 0, term.c.x, term.c.y); 891 if(term.c.y > 1)
892 tclearregion(0, 0, term.col-1, term.c.y-1);
893 tclearregion(0, term.c.y, term.c.x, term.c.y);
890 break; 894 break;
891 case 2: /* all */ 895 case 2: /* all */
892 tclearregion(0, 0, term.col-1, term.row-1); 896 tclearregion(0, 0, term.col-1, term.row-1);