]> git.armaanb.net Git - st.git/blobdiff - x.c
Fix FAQ typo
[st.git] / x.c
diff --git a/x.c b/x.c
index b7339e93f209ebbf31c3a17a0ea0e0ae5803d6e1..191e5dc7a4652088c878dab30375ff33b08cf93d 100644 (file)
--- a/x.c
+++ b/x.c
@@ -1092,6 +1092,9 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
 
                        frc[frclen].font = XftFontOpenPattern(xw.dpy,
                                        fontpattern);
+                       if (!frc[frclen].font)
+                               die("XftFontOpenPattern failed seeking fallback font: %s\n",
+                                       strerror(errno));
                        frc[frclen].flags = frcflags;
                        frc[frclen].unicodep = rune;
 
@@ -1266,7 +1269,6 @@ 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,8 +1288,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;
+       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.