JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Making rectangular selection work again.
[st.git] / st.c
diff --git a/st.c b/st.c
index fc9ed70..131cba8 100644 (file)
--- a/st.c
+++ b/st.c
@@ -649,13 +649,10 @@ selected(int x, int y) {
        if(sel.ey == y && sel.by == y) {
                bx = MIN(sel.bx, sel.ex);
                ex = MAX(sel.bx, sel.ex);
+
                return BETWEEN(x, bx, ex);
        }
 
-       return ((sel.b.y < y && y < sel.e.y)
-                       || (y == sel.e.y && x <= sel.e.x))
-                       || (y == sel.b.y && x >= sel.b.x
-                               && (x <= sel.e.x || sel.b.y != sel.e.y));
        switch(sel.type) {
        case SEL_REGULAR:
                return ((sel.b.y < y && y < sel.e.y)
@@ -2493,7 +2490,7 @@ xloadfont(Font *f, FcPattern *pattern) {
        f->lbearing = 0;
        f->rbearing = f->match->max_advance_width;
 
-       f->height = f->match->height;
+       f->height = f->ascent + f->descent;
        f->width = f->lbearing + f->rbearing;
 
        return 0;