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
cursor swaps fg and bg colors
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
23dd7f1
..
6f38311
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)
@@
-2576,7
+2579,10
@@
tputc(char *c, int len) {
unicodep = ascii = *c;
} else {
utf8decode(c, &unicodep, UTF_SIZ);
unicodep = ascii = *c;
} else {
utf8decode(c, &unicodep, UTF_SIZ);
- width = wcwidth(unicodep);
+ if ((width = wcwidth(unicodep)) == -1) {
+ c = "\357\277\275"; /* UTF_INVALID */
+ width = 1;
+ }
control = ISCONTROLC1(unicodep);
ascii = unicodep;
}
control = ISCONTROLC1(unicodep);
ascii = unicodep;
}
@@
-3500,9
+3506,9
@@
xdrawcursor(void) {
if(xw.state & WIN_FOCUSED) {
if(IS_SET(MODE_REVERSE)) {
g.mode |= ATTR_REVERSE;
if(xw.state & WIN_FOCUSED) {
if(IS_SET(MODE_REVERSE)) {
g.mode |= ATTR_REVERSE;
- g.fg = defaultcs;
- g.bg = defaultfg;
}
}
+ 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)\
sl = utf8len(g.c);
width = (term.line[term.c.y][curx].mode & ATTR_WIDE)\