Add context menu for breadcrumbs
* Open in new tab * Open in new window
This commit is contained in:
parent
0971f6f20f
commit
7d3ae07067
4 changed files with 159 additions and 24 deletions
11
src/app.rs
11
src/app.rs
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue