X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=cf329fd385b8961b2ac3e6cb20a2f2771adbdddf;hb=56c551e4f4b5678ba770106bf8a679c044bcf57e;hp=63c3f853d15711f11c54b534ecf60ec752b6d1f3;hpb=b1d383a0a344e35dad1064e129f70d52bddfd7b2;p=st.git diff --git a/st.c b/st.c index 63c3f85..cf329fd 100644 --- a/st.c +++ b/st.c @@ -739,6 +739,10 @@ execsh(void) { char **args; char *envshell = getenv("SHELL"); + unsetenv("COLUMNS"); + unsetenv("LINES"); + unsetenv("TERMCAP"); + DEFAULT(envshell, SHELL); putenv("TERM="TNAME); args = opt_cmd ? opt_cmd : (char*[]){envshell, "-i", NULL}; @@ -843,7 +847,6 @@ ttyresize(int x, int y) { w.ws_col = term.col; w.ws_xpixel = xw.w; w.ws_ypixel = xw.h; - w.ws_xpixel = w.ws_ypixel = 0; if(ioctl(cmdfd, TIOCSWINSZ, &w) < 0) fprintf(stderr, "Couldn't set window size: %s\n", SERRNO); }