Fix line cursor colours (fallout from `256-colours'), on both Windows and Unix.
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 19 Dec 2004 22:37:05 +0000 (22:37 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 19 Dec 2004 22:37:05 +0000 (22:37 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@5012 cda61777-01e9-0310-a592-d414129be87e

unix/pterm.c
windows/window.c

index 23ef37f..54ab31d 100644 (file)
@@ -2163,7 +2163,7 @@ void do_cursor(Context ctx, int x, int y, wchar_t *text, int len,
            length = inst->font_height;
        }
 
-       gdk_gc_set_foreground(gc, &inst->cols[NCFGCOLOURS-1]);
+       gdk_gc_set_foreground(gc, &inst->cols[261]);
        if (passive) {
            for (i = 0; i < length; i++) {
                if (i % 2 == 0) {
index 2d8c50c..1e1c824 100644 (file)
@@ -3234,7 +3234,7 @@ void do_cursor(Context ctx, int x, int y, wchar_t *text, int len,
        if (attr & TATTR_ACTCURS) {
            HPEN oldpen;
            oldpen =
-               SelectObject(hdc, CreatePen(PS_SOLID, 0, colours[23]));
+               SelectObject(hdc, CreatePen(PS_SOLID, 0, colours[261]));
            MoveToEx(hdc, startx, starty, NULL);
            LineTo(hdc, startx + dx * length, starty + dy * length);
            oldpen = SelectObject(hdc, oldpen);
@@ -3242,7 +3242,7 @@ void do_cursor(Context ctx, int x, int y, wchar_t *text, int len,
        } else {
            for (i = 0; i < length; i++) {
                if (i % 2 == 0) {
-                   SetPixel(hdc, startx, starty, colours[23]);
+                   SetPixel(hdc, startx, starty, colours[261]);
                }
                startx += dx;
                starty += dy;