do not assume filename is last arg

This commit is contained in:
Emil Lerch 2023-04-08 17:30:14 -07:00
parent 50dc69ae9b
commit 4a55140672
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -131,8 +131,9 @@ fn processArgs(args: [][:0]u8, line_array: *[display.LINES]*const [:0]u8) !Optio
continue;
}
if (is_filename) {
is_filename = false;
opts.background_filename = args[i]; // arg capture changes value...
break;
continue;
}
if ((arg[0] == '-' and arg.len > 1) and areDigits(arg[1..])) {
line_number = try std.fmt.parseInt(usize, arg[1..], 10);