+ if ((attr & (ATTR_ACTCURS | ATTR_PASCURS)) && cfg.cursor_type != 0) {
+ HPEN oldpen;
+ int pentype;
+ if (attr & ATTR_PASCURS)
+ pentype = PS_DOTTED;
+ else
+ pentype = PS_SOLID;
+ oldpen = SelectObject (hdc, CreatePen(pentype, 0, colours[23]));
+ if (cfg.cursor_type == 1) {
+ MoveToEx (hdc, x, y+descent, NULL);
+ LineTo (hdc, x+fnt_width-1, y+descent);
+ } else {
+ int xadjust = 0;
+ if (attr & ATTR_RIGHTCURS)
+ xadjust = fnt_width-1;
+ MoveToEx (hdc, x+xadjust, y, NULL);
+ LineTo (hdc, x+xadjust, y+font_height-1);
+ }
+ oldpen = SelectObject (hdc, oldpen);
+ DeleteObject (oldpen);
+ }