Xinqi Bao's Git
projects
/
st.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
edfbc9b
)
fixed ED.
author
Aurélien Aptel <
[email protected]
>
Sun, 31 Oct 2010 19:29:22 +0000
(20:29 +0100)
committer
Aurélien Aptel <
[email protected]
>
Sun, 31 Oct 2010 19:29:22 +0000
(20:29 +0100)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
ed8e2a8
..
76a2016
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-883,10
+883,14
@@
csihandle(void) {
case 'J': /* ED -- Clear screen */
switch(escseq.arg[0]) {
case 0: /* below */
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 */
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);
break;
case 2: /* all */
tclearregion(0, 0, term.col-1, term.row-1);