Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
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);
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 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)
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->lbearing = 0;
f->rbearing = f->match->max_advance_width;
- f->height = f->
match->heigh
t;
+ f->height = f->
ascent + f->descen
t;
f->width = f->lbearing + f->rbearing;
return 0;
f->width = f->lbearing + f->rbearing;
return 0;