aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 38177dec4..c4360f8d3 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2625,7 +2625,7 @@ static void colon(char *buf)
2625 if (useforce) { 2625 if (useforce) {
2626 if (*cmd == 'q') { 2626 if (*cmd == 'q') {
2627 // force end of argv list 2627 // force end of argv list
2628 optind = cmdline_filecnt - 1; 2628 optind = cmdline_filecnt;
2629 } 2629 }
2630 editing = 0; 2630 editing = 0;
2631 goto ret; 2631 goto ret;
@@ -4384,7 +4384,7 @@ int vi_main(int argc, char **argv)
4384 edit_file(argv[optind]); // might be NULL on 1st iteration 4384 edit_file(argv[optind]); // might be NULL on 1st iteration
4385 // NB: optind can be changed by ":next" and ":rewind" commands 4385 // NB: optind can be changed by ":next" and ":rewind" commands
4386 optind++; 4386 optind++;
4387 if (!argv[optind]) 4387 if (optind >= cmdline_filecnt)
4388 break; 4388 break;
4389 } 4389 }
4390 // "Use normal screen buffer, restore cursor" 4390 // "Use normal screen buffer, restore cursor"