Merge branch 'master' into zig-0.15.0
This commit is contained in:
		
						commit
						1fdfd41a4c
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -273,6 +273,7 @@ pub fn main() anyerror!void {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var have_project = false;
 | 
					    var have_project = false;
 | 
				
			||||||
 | 
					    var have_file = false;
 | 
				
			||||||
    if (args.project) |project| {
 | 
					    if (args.project) |project| {
 | 
				
			||||||
        try tui_proc.send(.{ "cmd", "open_project_dir", .{project} });
 | 
					        try tui_proc.send(.{ "cmd", "open_project_dir", .{project} });
 | 
				
			||||||
        have_project = true;
 | 
					        have_project = true;
 | 
				
			||||||
| 
						 | 
					@ -286,13 +287,16 @@ pub fn main() anyerror!void {
 | 
				
			||||||
            try tui_proc.send(.{ "cmd", "open_project_dir", .{dir.path} });
 | 
					            try tui_proc.send(.{ "cmd", "open_project_dir", .{dir.path} });
 | 
				
			||||||
            have_project = true;
 | 
					            have_project = true;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        else => {},
 | 
					        else => {
 | 
				
			||||||
 | 
					            have_file = true;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (links.items) |link| {
 | 
					    for (links.items) |link| {
 | 
				
			||||||
        try file_link.navigate(tui_proc.ref(), &link);
 | 
					        try file_link.navigate(tui_proc.ref(), &link);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (links.items.len == 0) {
 | 
					
 | 
				
			||||||
 | 
					    if (!have_file) {
 | 
				
			||||||
        if (!have_project)
 | 
					        if (!have_project)
 | 
				
			||||||
            try tui_proc.send(.{ "cmd", "open_project_cwd" });
 | 
					            try tui_proc.send(.{ "cmd", "open_project_cwd" });
 | 
				
			||||||
        try tui_proc.send(.{ "cmd", "show_home" });
 | 
					        try tui_proc.send(.{ "cmd", "show_home" });
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue