diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-09 18:12:08 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-09 18:12:08 +0200 |
| commit | b50365f7f662c97cff944e97a99378874efc8f6d (patch) | |
| tree | 2be41d99c102986f3c113fa88c198247adf3d58b | |
| parent | 0e05ad063f643c34359bcdf8253984bdcaed4b8c (diff) | |
| download | vis-b50365f7f662c97cff944e97a99378874efc8f6d.tar.gz vis-b50365f7f662c97cff944e97a99378874efc8f6d.tar.xz | |
Open all files given on command line
| -rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |
