diff --git a/src/main.zig b/src/main.zig index 4c2f74b..d0be6df 100644 --- a/src/main.zig +++ b/src/main.zig @@ -273,7 +273,6 @@ pub fn main() anyerror!void { } var have_project = false; - var have_file = false; if (args.project) |project| { try tui_proc.send(.{ "cmd", "open_project_dir", .{project} }); have_project = true; @@ -287,16 +286,13 @@ pub fn main() anyerror!void { try tui_proc.send(.{ "cmd", "open_project_dir", .{dir.path} }); have_project = true; }, - else => { - have_file = true; - }, + else => {}, }; for (links.items) |link| { try file_link.navigate(tui_proc.ref(), &link); } - - if (!have_file) { + if (links.items.len == 0) { if (!have_project) try tui_proc.send(.{ "cmd", "open_project_cwd" }); try tui_proc.send(.{ "cmd", "show_home" });