fixed ED.
This commit is contained in:
parent
edfbc9b432
commit
b1e6099220
1 changed files with 6 additions and 2 deletions
8
st.c
8
st.c
|
@ -883,10 +883,14 @@ csihandle(void) {
|
||||||
case 'J': /* ED -- Clear screen */
|
case 'J': /* ED -- Clear screen */
|
||||||
switch(escseq.arg[0]) {
|
switch(escseq.arg[0]) {
|
||||||
case 0: /* below */
|
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;
|
break;
|
||||||
case 1: /* above */
|
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;
|
break;
|
||||||
case 2: /* all */
|
case 2: /* all */
|
||||||
tclearregion(0, 0, term.col-1, term.row-1);
|
tclearregion(0, 0, term.col-1, term.row-1);
|
||||||
|
|
Loading…
Reference in a new issue