selextend: clarify: !sel.mode == SEL_IDLE
[st.git] / st.c
diff --git a/st.c b/st.c
index 75c3dd1..46c954b 100644 (file)
--- a/st.c
+++ b/st.c
@@ -13,6 +13,7 @@
 #include <sys/select.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <termios.h>
 #include <unistd.h>
 #include <wchar.h>
 
@@ -460,7 +461,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();
@@ -739,7 +740,6 @@ sigchld(int a)
        exit(0);
 }
 
-
 void
 stty(char **args)
 {
@@ -761,7 +761,7 @@ stty(char **args)
        }
        *q = '\0';
        if (system(cmd) != 0)
-           perror("Couldn't call stty");
+               perror("Couldn't call stty");
 }
 
 int