From 4b405540db0bd96466df4eb5f25228517086cb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 8 Jul 2015 11:50:00 +0200 Subject: vis: only read file content from stdin if - was specified This allows to feed keyboard input from a file as in: cat keyboard-input | vis input-file which will be used for testing purposes. --- vis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vis.c b/vis.c index 4520fe3..ef98eea 100644 --- a/vis.c +++ b/vis.c @@ -2387,7 +2387,7 @@ int main(int argc, char *argv[]) { } if (!vis->windows) { - if (!strcmp(argv[argc-1], "-") || !isatty(STDIN_FILENO)) { + if (!strcmp(argv[argc-1], "-")) { if (!vis_window_new(NULL)) die("Can not create empty buffer\n"); ssize_t len = 0; -- cgit v1.2.3