Enable context menu popups in dialog, close context menu when location changes
This commit is contained in:
parent
e1bc0abaab
commit
a6e369df0f
3 changed files with 84 additions and 13 deletions
24
src/tab.rs
24
src/tab.rs
|
|
@ -3879,18 +3879,6 @@ impl Tab {
|
|||
));
|
||||
}
|
||||
|
||||
//TODO: check for wayland
|
||||
if self.context_menu != last_context_menu {
|
||||
if last_context_menu.is_some() {
|
||||
commands.push(Command::ContextMenu(None));
|
||||
}
|
||||
if let Some(point) = self.context_menu {
|
||||
commands.push(Command::ContextMenu(Some(
|
||||
point + self.offset_opt.unwrap_or_default(),
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
// Change directory if requested
|
||||
if let Some(mut location) = cd {
|
||||
if matches!(self.mode, Mode::Desktop) {
|
||||
|
|
@ -3935,6 +3923,18 @@ impl Tab {
|
|||
}
|
||||
}
|
||||
|
||||
// Update context menu popup
|
||||
if self.context_menu != last_context_menu {
|
||||
if last_context_menu.is_some() {
|
||||
commands.push(Command::ContextMenu(None));
|
||||
}
|
||||
if let Some(point) = self.context_menu {
|
||||
commands.push(Command::ContextMenu(Some(
|
||||
point + self.offset_opt.unwrap_or_default(),
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
commands
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue