X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=70caf8294cd4773b19e483bb78597572a2f1c2c1;hb=b8d6171cb00c28e4c90e58e101554097003b59d3;hp=6fef7f38be7840097d3d928f593cec079b8dbf86;hpb=3cb80840dbf9add2b5f9c26da9650da39e34906d;p=st.git diff --git a/st.c b/st.c index 6fef7f3..70caf82 100644 --- a/st.c +++ b/st.c @@ -1855,7 +1855,10 @@ tsetmode(bool priv, bool set, int *args, int narg) { MODBIT(term.mode, set, MODE_8BIT); break; case 1049: /* swap screen & set/restore cursor as xterm */ + if (!allowaltscreen) + break; tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); + /* FALLTHRU */ case 47: /* swap screen */ case 1047: if (!allowaltscreen) @@ -3737,8 +3740,8 @@ run(void) { else cresize(xw.fw, xw.fh); - gettimeofday(&lastblink, NULL); gettimeofday(&last, NULL); + lastblink = last; for(xev = actionfps;;) { long deltatime; @@ -3773,7 +3776,7 @@ run(void) { if(blinktimeout && TIMEDIFF(now, lastblink) > blinktimeout) { tsetdirtattr(ATTR_BLINK); term.mode ^= MODE_BLINK; - gettimeofday(&lastblink, NULL); + lastblink = now; dodraw = 1; } deltatime = TIMEDIFF(now, last);