diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-07-08 11:50:00 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-07-08 11:50:00 +0200 |
| commit | 4b405540db0bd96466df4eb5f25228517086cb48 (patch) | |
| tree | e42294dbe877d5fb35273924fcdd78a342673a5d /vis.c | |
| parent | 2a39201f65c97cf666c562c281defd8b8e2f8937 (diff) | |
| download | vis-4b405540db0bd96466df4eb5f25228517086cb48.tar.gz vis-4b405540db0bd96466df4eb5f25228517086cb48.tar.xz | |
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.
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
