And fix _cursor_ display on double-width double-width characters (as
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 15 Oct 2004 12:25:51 +0000 (12:25 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 15 Oct 2004 12:25:51 +0000 (12:25 +0000)
it were).

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

unix/pterm.c

index cc47d1d..ec1ffec 100644 (file)
@@ -2078,7 +2078,7 @@ void do_cursor(Context ctx, int x, int y, wchar_t *text, int len,
            gdk_draw_rectangle(inst->pixmap, gc, 0,
                               x*inst->font_width+inst->cfg.window_border,
                               y*inst->font_height+inst->cfg.window_border,
-                              len*inst->font_width-1, inst->font_height-1);
+                              len*widefactor*inst->font_width-1, inst->font_height-1);
        }
     } else {
        int uheight;
@@ -2100,7 +2100,7 @@ void do_cursor(Context ctx, int x, int y, wchar_t *text, int len,
            starty = y * inst->font_height + inst->cfg.window_border + uheight;
            dx = 1;
            dy = 0;
-           length = len * char_width;
+           length = len * widefactor * char_width;
        } else {
            int xadjust = 0;
            if (attr & TATTR_RIGHTCURS)