X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=ab9593ead339ee991129a86da63728a01576adc1;hb=77c51c5a6b16387f1792e23acbcf2080f790aa25;hp=6474a01b29d716c967443e00e47885c0f9701e1a;hpb=e2ee5ee6114eb74bb08cb9abe5a3020203e92688;p=st.git diff --git a/x.c b/x.c index 6474a01..ab9593e 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 *); @@ -508,6 +507,7 @@ xsetsel(char *str, Time t) XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) selclear_(NULL); + xclipcopy(); } void @@ -1286,6 +1286,8 @@ xdrawcursor(void) xdrawglyph(og, oldx, oldy); g.u = term.line[term.c.y][term.c.x].u; + g.mode |= term.line[term.c.y][term.c.x].mode & + (ATTR_BOLD | ATTR_ITALIC | ATTR_UNDERLINE | ATTR_STRUCK); /* * Select the right color for the right mode.