Add context menu for breadcrumbs

* Open in new tab
* Open in new window
This commit is contained in:
Jason Rodney Hansen 2024-06-30 10:05:58 -06:00 committed by Jeremy Soller
parent 0971f6f20f
commit 7d3ae07067
4 changed files with 159 additions and 24 deletions

View file

@ -1740,6 +1740,17 @@ impl Application for App {
tab::Command::OpenInNewTab(path) => {
commands.push(self.open_tab(Location::Path(path.clone())));
}
tab::Command::OpenInNewWindow(path) => match env::current_exe() {
Ok(exe) => match process::Command::new(&exe).arg(path).spawn() {
Ok(_child) => {}
Err(err) => {
log::error!("failed to execute {:?}: {}", exe, err);
}
},
Err(err) => {
log::error!("failed to get current executable path: {}", err);
}
},
tab::Command::Scroll(id, offset) => {
commands.push(scrollable::scroll_to(id, offset));
}