From fdc94dd1746632e036367456be5a77b11512ac1b Mon Sep 17 00:00:00 2001 From: jacob Date: Sun, 19 Dec 2004 22:37:05 +0000 Subject: [PATCH] Fix line cursor colours (fallout from `256-colours'), on both Windows and Unix. git-svn-id: svn://svn.tartarus.org/sgt/putty@5012 cda61777-01e9-0310-a592-d414129be87e --- unix/pterm.c | 2 +- windows/window.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/pterm.c b/unix/pterm.c index 23ef37fb..54ab31d8 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -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) { diff --git a/windows/window.c b/windows/window.c index 2d8c50c1..1e1c824e 100644 --- a/windows/window.c +++ b/windows/window.c @@ -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; -- 2.11.0