X-Git-Url: https://jasonwoof.com/gitweb/?p=st.git;a=blobdiff_plain;f=st.c;h=ce8c5c992dd83dd949255374244658d6584e2b09;hp=68dc2be75d8dab4dbfbb094d4f10eafec9c9ace1;hb=db1292d2032c5fbbf266f9ef82f2fdfa493f389f;hpb=c9357a8edfe6d047da95b85c5f3c18b9db40d172 diff --git a/st.c b/st.c index 68dc2be..ce8c5c9 100644 --- a/st.c +++ b/st.c @@ -2272,12 +2272,23 @@ strhandle(void) { void strparse(void) { + int c; 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 @@ -3943,15 +3954,16 @@ run(void) { } 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; + if(blinktimeout) { + lastblink = now; + MODBIT(term.mode, 1, MODE_BLINK); + blinkset = 1; + } + } clock_gettime(CLOCK_MONOTONIC, &now); drawtimeout.tv_sec = 0;