X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=b7339e93f209ebbf31c3a17a0ea0e0ae5803d6e1;hb=f2bfd513b14a2aa27796670235557a550b4189db;hp=6474a01b29d716c967443e00e47885c0f9701e1a;hpb=e2ee5ee6114eb74bb08cb9abe5a3020203e92688;p=st.git diff --git a/x.c b/x.c index 6474a01..b7339e9 100644 --- a/x.c +++ b/x.c @@ -88,7 +88,6 @@ static void xclear(int, int, int, int); static void xdrawcursor(void); static int xgeommasktogravity(int); static int xloadfont(Font *, FcPattern *); -static void xsetsel(char *, Time); static void xunloadfont(Font *); static void expose(XEvent *); @@ -1267,6 +1266,7 @@ xdrawcursor(void) Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}, og; int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); Color drawcol; + unsigned attr; LIMIT(oldx, 0, term.col-1); LIMIT(oldy, 0, term.row-1); @@ -1286,6 +1286,8 @@ xdrawcursor(void) xdrawglyph(og, oldx, oldy); g.u = term.line[term.c.y][term.c.x].u; + attr = ATTR_BOLD | ATTR_ITALIC | ATTR_UNDERLINE | ATTR_STRUCK; + g.mode |= term.line[term.c.y][term.c.x].mode & attr; /* * Select the right color for the right mode.