From b50365f7f662c97cff944e97a99378874efc8f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 9 Sep 2014 18:12:08 +0200 Subject: Open all files given on command line --- main.c | 8 ++++++-- 1 file 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; -- cgit v1.2.3