*** empty log message ***
authorroot <root>
Wed, 11 Jan 2006 05:14:26 +0000 (05:14 +0000)
committerroot <root>
Wed, 11 Jan 2006 05:14:26 +0000 (05:14 +0000)
Changes
src/command.C
src/main.C
src/screen.C

diff --git a/Changes b/Changes
index 2146de3de07a01e5cb5f4bd01dc87f91892adad5..5632cd033fcf9ae33b189d64c8cd5c5bf7ef1aa1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -6,12 +6,13 @@ TODO: "slow" rendering mode for bidi and scripts
 TODO: read property sequence is broken with respect to utf-8 etc.
 TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
 TODO: clarify and get rid of SMOOTH_REFRESH etc.
-TODO: run external commands more sytematically (using $self->env etc.)
-WISH: OnTheSpot editing, or maybe switch to miiiiiiif
+WISH: OnTheSpot editing, or maybe switch to miiiiiiif. or maybe use perl and an overlay...
 WISH: just for fun, do shade and tint with XRender.
 WISH: support tex fonts
 
 7.0
+TODO: run external commands more sytematically (using $self->env etc.)
+TODO: document searchable-scorllback hotkey
        - added sections for DISTRIBUTION MAINTAINERS and about
           SETUID/SETGID to the FAQ.
         - selection, searchable-scrollback, selection-popup and
@@ -37,6 +38,9 @@ WISH: support tex fonts
           compatible, and not really small either.
         - removed PATH_ENV and PATH file search support.
         - removed support for locale-specific app-defaults file.
+        - fixed a bug where out-of-bounds colour sequences could lead
+          to crashes.
+        - XTerm_Color01 sequence returned wrong results in query mode.
 
 6.3  Wed Jan  4 22:37:10 CET 2006
         - SECURITY FIX: on systems using openpty, permissions were
index 2641c2248c18ae84bdb16996b82fe00ed4a6f5b7..e5692203df07637b5ed05a46e62bf0b5adfa9307 100644 (file)
@@ -3860,9 +3860,9 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp)
               break;
 
             *name++ = '\0';
-            color = atoi (buf);
+            color = atoi (buf) + minCOLOR;
 
-            if (color < 0 || color >= TOTAL_COLORS)
+            if (!IN_RANGE_EXC (color, minCOLOR, TOTAL_COLORS))
               break;
 
             if ((buf = strchr (name, ';')) != NULL)
@@ -3871,18 +3871,18 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp)
             if (name[0] == '?' && !name[1])
               {
                 unsigned short r, g, b;
-                pix_colors_focused[color + minCOLOR].get (display, r, g, b);
+                pix_colors_focused[color].get (display, r, g, b);
                 tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp);
               }
             else
-              set_window_color (color + minCOLOR, name);
+              set_window_color (color, name);
           }
         break;
       case XTerm_Color00:
         process_color_seq (XTerm_Color00, Color_fg, str, resp);
         break;
       case XTerm_Color01:
-        process_color_seq (XTerm_Color00, Color_bg, str, resp);
+        process_color_seq (XTerm_Color01, Color_bg, str, resp);
         break;
 #ifndef NO_CURSORCOLOR
       case XTerm_Color_cursor:
@@ -3924,9 +3924,10 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp)
 #if XPM_BACKGROUND
             scale_pixmap (""); /* reset to default scaling */
             set_bgPixmap (str);        /* change pixmap */
-#endif
             scr_touch (true);
+#endif
           }
+
         while ((str = strchr (str, ';')) != NULL)
           {
             str++;
@@ -3939,8 +3940,8 @@ rxvt_term::process_xterm_seq (int op, const char *str, char resp)
           {
 #ifdef XPM_BACKGROUND
             resize_pixmap ();
-#endif
             scr_touch (true);
+#endif
           }
         break;
 
index 5d55faa1475cd479f37868ee3815fcb909843184..5959dd4fd1f46bd1c6be315bba40b89b51aecf9d 100644 (file)
@@ -286,7 +286,6 @@ rxvt_term::~rxvt_term ()
     }
 
   // TODO: free pixcolours, colours should become part of rxvt_display
-
   delete pix_colors_focused;
 #if OFF_FOCUS_FADING
   delete pix_colors_unfocused;
index 1478194ccb54ee2ca9074d5b2063ad391c41616a..2b7cff843ef4332f6ecf956e4266a615fa552c30 100644 (file)
@@ -574,7 +574,7 @@ rxvt_term::scr_do_wrap ()
 void
 rxvt_term::scr_color (unsigned int color, int fgbg)
 {
-  if (color > maxTermCOLOR)
+  if (!IN_RANGE_INC (color, minTermCOLOR, maxTermCOLOR))
     color = fgbg;
 
   if (fgbg == Color_fg)