summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig
index 1cbdf24c..9abc04bf 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -270,10 +270,6 @@ fn nativeMain(init: std.process.Init) !void {
}
}
opts.tty_only = explicit_tty or session_only;
- // The real bare-tty startup wants the editor half present from the first
- // frame, so it names that layout; a core booted for a test names none and
- // gets the raw shell by itself.
- if (opts.tty_only) opts.boot = .tty;
opts.mounts = mounts[0..mounts_len];
if (detach != null and attach != null)
badArgs(init.io, "--detach and --attach are opposites: one runs the session, the other joins one", .{});
@@ -370,6 +366,13 @@ fn nativeMain(init: std.process.Init) !void {
}
}
}
+ // The real bare-tty startup wants the editor half present from the first
+ // frame, so it names that layout; a core booted for a test names none and
+ // gets the raw shell by itself. This has to come AFTER the positional is
+ // resolved: naming a layout short-circuits `Boot.of`, so choosing it any
+ // earlier threw away a file argument, and the error pane for one that does
+ // not exist, without a word.
+ if (opts.tty_only and opts.file == null and opts.missing == null) opts.boot = .tty;
const found = pardes.config.User.load(init.io, arena, init.environ_map);
opts.startup_config = found.bytes;
opts.startup_config_path = found.path;