qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs tty.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs tty.c
Date: Thu, 20 Dec 2007 20:40:55 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/20 20:40:55

Modified files:
        .              : tty.c 

Log message:
        adjust bogus window size

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.27&r2=1.28

Patches:
Index: tty.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/tty.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- tty.c       18 Dec 2007 12:22:09 -0000      1.27
+++ tty.c       20 Dec 2007 20:40:55 -0000      1.28
@@ -265,6 +265,10 @@
     if (ioctl(fileno(s->STDIN), TIOCGWINSZ, &ws) == 0) {
         s->width = ws.ws_col;
         s->height = ws.ws_row;
+        if (s->width > MAX_SCREEN_WIDTH)
+            s->width = MAX_SCREEN_WIDTH;
+        if (s->height < 3)
+            s->height = 3;
     }
     
     count = s->width * s->height;
@@ -666,7 +670,7 @@
     for (; len > 0; len--) {
         cc = *str++;
         w = tty_term_glyph_width(s, cc);
-        /* XXX: would need to put spacs for wide chars */
+        /* XXX: would need to put spaces for wide chars */
         if (x + w > s->clip_x2) 
             break;
         *ptr = TTYCHAR(cc, fgcolor, TTYCHAR_GETBG(*ptr));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]