pinosaur
/
st.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug where first selection snaps to lines
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
e885a7d
..
b2a4fff
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-695,9
+695,10
@@
utf8validate(Rune *u, size_t i)
void
selinit(void)
{
void
selinit(void)
{
-
memset(&sel.tclick1, 0, sizeof(sel.tclick1)
);
-
memset(&sel.tclick2, 0, sizeof(sel.tclick2)
);
+
clock_gettime(CLOCK_MONOTONIC, &sel.tclick1
);
+
clock_gettime(CLOCK_MONOTONIC, &sel.tclick2
);
sel.mode = SEL_IDLE;
sel.mode = SEL_IDLE;
+ sel.snap = 0;
sel.ob.x = -1;
sel.primary = NULL;
sel.clipboard = NULL;
sel.ob.x = -1;
sel.primary = NULL;
sel.clipboard = NULL;
@@
-3865,13
+3866,12
@@
xdrawcursor(void)
g.fg = defaultcs;
}
} else {
g.fg = defaultcs;
}
} else {
- g.fg = defaultfg;
if (ena_sel && selected(term.c.x, term.c.y)) {
if (ena_sel && selected(term.c.x, term.c.y)) {
- g.bg = defaultcs;
drawcol = dc.col[defaultrcs];
drawcol = dc.col[defaultrcs];
+ g.fg = defaultfg;
+ g.bg = defaultrcs;
} else {
drawcol = dc.col[defaultcs];
} else {
drawcol = dc.col[defaultcs];
- g.bg = defaultrcs;
}
}
}
}