Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
fix segfault with mouse selection. (thx anonymous)
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
b331ead
..
df8353a
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-615,7
+615,7
@@
bmotion(XEvent *e) {
if(oldey != sel.ey || oldex != sel.ex) {
int starty = MIN(oldey, sel.ey);
int endy = MAX(oldey, sel.ey);
if(oldey != sel.ey || oldex != sel.ex) {
int starty = MIN(oldey, sel.ey);
int endy = MAX(oldey, sel.ey);
- drawregion(0, (starty > 0 ? starty : 0), term.col, (
sel.e
y < term.row ? endy+1 : term.row));
+ drawregion(0, (starty > 0 ? starty : 0), term.col, (
end
y < term.row ? endy+1 : term.row));
}
}
}
}
}
}