[hackers] [st] fixed ED. || Aurélien Aptel

From: <hg_AT_suckless.org>
Date: Sun, 31 Oct 2010 18:28:15 +0000 (UTC)

changeset: 162:94c886b859a1
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Sun Oct 31 20:29:22 2010 +0100
files: st.c
description:
fixed ED.

diff -r 8bf9a341725e -r 94c886b859a1 st.c
--- a/st.c Mon Oct 25 16:45:13 2010 -0400
+++ b/st.c Sun Oct 31 20:29:22 2010 +0100
@@ -883,10 +883,14 @@
         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);
Received on Sun Oct 31 2010 - 19:28:15 CET

This archive was generated by hypermail 2.2.0 : Sun Oct 31 2010 - 19:36:07 CET