diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/main.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/main.zig b/runtime/main.zig index dc351c30..0751f6b0 100644 --- a/runtime/main.zig +++ b/runtime/main.zig @@ -1176,6 +1176,14 @@ fn nativeMain(std_init: std.process.Init) !void { var positional: ?[:0]const u8 = null; var wait = false; var i: usize = if (resuming or paired != null) 2 else 1; + // An upgraded session's arguments are the ones it was started with: its + // `new` is the verb still, not a file's name (taken for one, the file + // after it was "the second" and the session ended at its Upgrade). + if (resuming and args.len > i and std.meta.stringToEnum(Cmd, args[i]) == .new) { + new_session = true; + new_verb = true; + i += 1; + } // A command's name first: new and attach go on to start or join a // session, with the flags after them; the rest are done in `command`. if (!resuming and args.len > i) if (std.meta.stringToEnum(Cmd, args[i])) |cmd| switch (cmd) { |
