diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-10-31 20:29:22 +0100 | 
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-10-31 20:29:22 +0100 | 
| commit | 4569bab9c2fd59c93263a23caf71442d4b0934a4 (patch) | |
| tree | ef53bb466b195775160fde1b6299a897075e1db4 | |
| parent | ea4d528fb9b148ba63bc5034d649c11110fd71a1 (diff) | |
| download | st-4569bab9c2fd59c93263a23caf71442d4b0934a4.tar.gz st-4569bab9c2fd59c93263a23caf71442d4b0934a4.tar.bz2  | |
fixed ED.
| -rw-r--r-- | st.c | 8 | 
1 files changed, 6 insertions, 2 deletions
@@ -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);  | 
