st

simple terminal

git clone https://9o.is/git/st.git

commit 5a88bf9b1cbc174d536872c660135d5a49b6137d
parent 9b1a3e3a564a43440dfc44546425a346be5784dc
Author: Christoph Lohmann <20h@r-36.net>
Date:   Wed,  1 May 2013 13:14:46 +0200

More stable blinking.

Diffstat:
Mst.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/st.c b/st.c @@ -3496,8 +3496,15 @@ run(void) { xev--; if(!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) { if(blinkset) { - drawtimeout.tv_usec = 1000 * \ - blinktimeout; + if(TIMEDIFF(now, lastblink) \ + > blinktimeout) { + drawtimeout.tv_usec = 1; + } else { + drawtimeout.tv_usec = (1000 * \ + (blinktimeout - \ + TIMEDIFF(now, + lastblink))); + } } else { tv = NULL; }