Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
st.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no more blinking
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
00fca99
..
ce8c5c9
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-996,6
+996,8
@@
selnotify(XEvent *e) {
ofs = 0;
xsev = (XSelectionEvent *)e;
ofs = 0;
xsev = (XSelectionEvent *)e;
+ if (xsev->property == None)
+ return;
do {
if(XGetWindowProperty(xw.dpy, xw.win, xsev->property, ofs,
BUFSIZ/4, False, AnyPropertyType,
do {
if(XGetWindowProperty(xw.dpy, xw.win, xsev->property, ofs,
BUFSIZ/4, False, AnyPropertyType,
@@
-2270,12
+2272,23
@@
strhandle(void) {
void
strparse(void) {
void
strparse(void) {
+ int c;
char *p = strescseq.buf;
strescseq.narg = 0;
strescseq.buf[strescseq.len] = '\0';
char *p = strescseq.buf;
strescseq.narg = 0;
strescseq.buf[strescseq.len] = '\0';
- while(p && strescseq.narg < STR_ARG_SIZ)
- strescseq.args[strescseq.narg++] = strsep(&p, ";");
+
+ if(*p == '\0')
+ return;
+
+ while(strescseq.narg < STR_ARG_SIZ) {
+ strescseq.args[strescseq.narg++] = p;
+ while((c = *p) != ';' && c != '\0')
+ ++p;
+ if(c == '\0')
+ return;
+ *p++ = '\0';
+ }
}
void
}
void
@@
-3941,15
+3954,16
@@
run(void) {
}
if(FD_ISSET(cmdfd, &rfd)) {
ttyread();
}
if(FD_ISSET(cmdfd, &rfd)) {
ttyread();
- if(blinktimeout) {
- blinkset = tattrset(ATTR_BLINK);
- if(!blinkset)
- MODBIT(term.mode, 0, MODE_BLINK);
- }
}
}
- if(FD_ISSET(xfd, &rfd))
+ if(FD_ISSET(xfd, &rfd)) {
xev = actionfps;
xev = actionfps;
+ if(blinktimeout) {
+ lastblink = now;
+ MODBIT(term.mode, 1, MODE_BLINK);
+ blinkset = 1;
+ }
+ }
clock_gettime(CLOCK_MONOTONIC, &now);
drawtimeout.tv_sec = 0;
clock_gettime(CLOCK_MONOTONIC, &now);
drawtimeout.tv_sec = 0;