feat: add open_most_recent_file command
This commit is contained in:
		
							parent
							
								
									80002e4d6b
								
							
						
					
					
						commit
						21fe6103bf
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -938,6 +938,12 @@ const cmds = struct {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    pub const open_previous_file_meta: Meta = .{ .description = "Open the previous file" };
 | 
					    pub const open_previous_file_meta: Meta = .{ .description = "Open the previous file" };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pub fn open_most_recent_file(self: *Self, _: Ctx) Result {
 | 
				
			||||||
 | 
					        if (try project_manager.request_most_recent_file(self.allocator)) |file_path|
 | 
				
			||||||
 | 
					            self.show_file_async(file_path);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    pub const open_most_recent_file_meta: Meta = .{ .description = "Open the last changed file" };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pub fn system_paste(self: *Self, _: Ctx) Result {
 | 
					    pub fn system_paste(self: *Self, _: Ctx) Result {
 | 
				
			||||||
        if (builtin.os.tag == .windows) {
 | 
					        if (builtin.os.tag == .windows) {
 | 
				
			||||||
            const text = try @import("renderer").request_windows_clipboard(self.allocator);
 | 
					            const text = try @import("renderer").request_windows_clipboard(self.allocator);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue