Merge commit 'origin'
[nedit-bw.git] / UnderlineStyle-fix-colors.diff
blob362b2364f2eb534ce1938616ee7f7f255acaab6a
1 Subject: change underline color to my tasting
3 ---
5 source/textDisp.c | 4 ++++
6 1 file changed, 4 insertions(+)
8 diff --quilt old/source/textDisp.c new/source/textDisp.c
9 --- old/source/textDisp.c
10 +++ new/source/textDisp.c
11 @@ -2310,6 +2310,8 @@ static void drawString(textDisp *textD,
12 /* Underline if style is secondary selection */
13 if (style & SECONDARY_MASK)
15 + gcValues.foreground = textD->fgPixel;
16 + XChangeGC(XtDisplay(textD->w), gc, GCForeground, &gcValues);
17 /* draw underline */
18 XDrawLine(XtDisplay(textD->w), XtWindow(textD->w), gc, x,
19 y + textD->ascent, toX - 1, y + textD->ascent);
20 @@ -2318,6 +2320,8 @@ static void drawString(textDisp *textD,
21 if (underlineStyle)
23 int bottom = textD->ascent + textD->descent - 1;
24 + gcValues.foreground = fground;
25 + XChangeGC(XtDisplay(textD->w), gc, GCForeground, &gcValues);
26 /* draw underline - use textD->gc for the non-highlighted text color */
27 XDrawLine(XtDisplay(textD->w), XtWindow(textD->w), gc, x,
28 y + bottom, toX - 1, y + bottom);