Fix a typo in r9214 that plausibly explains a resizing weirdness I had with
[u/mdw/putty] / windows / window.c
index 908c1f6..102c470 100644 (file)
@@ -2934,7 +2934,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
                      */
                    need_backend_resize = TRUE;
                    conf_set_int(conf, CONF_height, h);
-                   conf_set_int(conf, CONF_height, w);
+                   conf_set_int(conf, CONF_width, w);
                 } else {
                     term_size(term, h, w, conf_get_int(conf, CONF_savelines));
                 }
@@ -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);
     }