When doing manual underlining, underline the text in question rather than a box
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Fri, 15 Jul 2011 16:03:06 +0000 (16:03 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Fri, 15 Jul 2011 16:03:06 +0000 (16:03 +0000)
to the right of it. Probably introduced sometime around r9063.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9217 cda61777-01e9-0310-a592-d414129be87e

windows/window.c

index 908c1f6..da0d3d4 100644 (file)
@@ -3594,8 +3594,8 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
            dec = dec * 2 - font_height;
 
        oldpen = SelectObject(hdc, CreatePen(PS_SOLID, 0, fg));
-       MoveToEx(hdc, x, y + dec, NULL);
-       LineTo(hdc, x + len * char_width, y + dec);
+       MoveToEx(hdc, line_box.left, line_box.top + dec, NULL);
+       LineTo(hdc, line_box.right, line_box.top + dec);
        oldpen = SelectObject(hdc, oldpen);
        DeleteObject(oldpen);
     }