vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 10c0443ccc46285b8e767fbcb60b687bf3cf8d12 parent 3ec962bb2d1c7ca29ffc2bbc42f41cec09f935cf Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 9 Sep 2014 18:12:08 +0200 Open all files given on command line Diffstat:
| M | main.c | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git 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;