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
subvert blinking code to blink cursor
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
ad52280
..
80910f3
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-1158,7
+1158,10
@@
execsh(void) {
die("who are you?\n");
}
die("who are you?\n");
}
- sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
+ if (!(sh = getenv("SHELL"))) {
+ sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
+ }
+
if(opt_cmd)
prog = opt_cmd[0];
else if(utmp)
if(opt_cmd)
prog = opt_cmd[0];
else if(utmp)
@@
-3501,16
+3504,18
@@
xdrawcursor(void) {
/* draw the new one */
if(xw.state & WIN_FOCUSED) {
/* draw the new one */
if(xw.state & WIN_FOCUSED) {
- if(IS_SET(MODE_REVERSE)) {
- g.mode |= ATTR_REVERSE;
- g.fg = defaultcs;
- g.bg = defaultfg;
- }
+ if(term.mode & MODE_BLINK) {
+ if(IS_SET(MODE_REVERSE)) {
+ g.mode |= ATTR_REVERSE;
+ }
+ g.fg = term.line[term.c.y][curx].bg;
+ g.bg = term.line[term.c.y][curx].fg;
- sl = utf8len(g.c);
- width = (term.line[term.c.y][curx].mode & ATTR_WIDE)\
- ? 2 : 1;
- xdraws(g.c, g, term.c.x, term.c.y, width, sl);
+ sl = utf8len(g.c);
+ width = (term.line[term.c.y][curx].mode & ATTR_WIDE)\
+ ? 2 : 1;
+ xdraws(g.c, g, term.c.x, term.c.y, width, sl);
+ }
} else {
XftDrawRect(xw.draw, &dc.col[defaultcs],
borderpx + curx * xw.cw,
} else {
XftDrawRect(xw.draw, &dc.col[defaultcs],
borderpx + curx * xw.cw,
@@
-3863,15
+3868,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;