X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=2612c955872b516a0ad76e2097b7f09d9a47bc78;hb=74cff67bd7746c2636ea7bc78a0b8af2f8c44838;hp=65a0cb61197400aa7dbb79a4ff42a261bad1423f;hpb=8b8255ac0e188445f6904ff16272e9e93093cbde;p=st.git diff --git a/st.c b/st.c index 65a0cb6..2612c95 100644 --- a/st.c +++ b/st.c @@ -446,6 +446,7 @@ selstart(int col, int row, int snap) selclear(); sel.mode = SEL_EMPTY; sel.type = SEL_REGULAR; + sel.alt = IS_SET(MODE_ALTSCREEN); sel.snap = snap; sel.oe.x = sel.ob.x = col; sel.oe.y = sel.ob.y = row; @@ -461,7 +462,7 @@ selextend(int col, int row, int type, int done) { int oldey, oldex, oldsby, oldsey, oldtype; - if (!sel.mode) + if (sel.mode == SEL_IDLE) return; if (done && sel.mode == SEL_EMPTY) { selclear(); @@ -474,7 +475,6 @@ selextend(int col, int row, int type, int done) oldsey = sel.ne.y; oldtype = sel.type; - sel.alt = IS_SET(MODE_ALTSCREEN); sel.oe.x = col; sel.oe.y = row; selnormalize(); @@ -740,7 +740,6 @@ sigchld(int a) exit(0); } - void stty(char **args) { @@ -762,7 +761,7 @@ stty(char **args) } *q = '\0'; if (system(cmd) != 0) - perror("Couldn't call stty"); + perror("Couldn't call stty"); } int