]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix picker and list mode conflict (#533)
authorKlzXS <azszwymmvqdi@yahoo.com>
Fri, 24 Apr 2020 14:56:09 +0000 (16:56 +0200)
committerGitHub <noreply@github.com>
Fri, 24 Apr 2020 14:56:09 +0000 (20:26 +0530)
* Fix picker and list mode conflict

* Comment the change

src/nnn.c

index ef1b50ac8760f395e626623905c75951539fa8a7..5f90fae81a83155a9fcf871bce9b8804c5684d41 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6827,6 +6827,10 @@ int main(int argc, char *argv[])
                }
        }
 
+       /* Prevent picker and list mode conflict */
+       if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO))
+               exit(1);
+
        home = getenv("HOME");
        if (!home) {
                fprintf(stderr, "set HOME\n");