aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-09 18:12:08 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-09 18:12:08 +0200
commitb50365f7f662c97cff944e97a99378874efc8f6d (patch)
tree2be41d99c102986f3c113fa88c198247adf3d58b /main.c
parent0e05ad063f643c34359bcdf8253984bdcaed4b8c (diff)
downloadvis-b50365f7f662c97cff944e97a99378874efc8f6d.tar.gz
vis-b50365f7f662c97cff944e97a99378874efc8f6d.tar.xz
Open all files given on command line
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index b998786..13b5da1 100644
--- a/main.c
+++ b/main.c
@@ -244,9 +244,13 @@ int main(int argc, char *argv[]) {
if (!vis_syntax_load(vis, syntaxes, colors))
return 1;
vis_statusbar_set(vis, config->statusbar);
- char *filename = argc > 1 ? argv[1] : NULL;
- if (!vis_window_new(vis, filename))
+
+ if (!vis_window_new(vis, argc > 1 ? argv[1] : NULL))
return 1;
+ for (int i = 2; i < argc; i++) {
+ if (!vis_window_new(vis, argv[i]))
+ return 1;
+ }
struct timeval idle = { .tv_usec = 0 }, *timeout = NULL;
Key key, key_prev, *key_mod = NULL;