Make sure to grab focus after context menu

This commit is contained in:
Mattias Eriksson 2024-02-05 19:35:03 +01:00 • committed by Jeremy Soller
parent da33dfc5c8
commit 4f25324929

View file

@ -919,12 +919,13 @@ impl Application for App {
let terminal = terminal.lock().unwrap(); let terminal = terminal.lock().unwrap();
let term = terminal.term.lock(); let term = terminal.term.lock();
if let Some(text) = term.selection_to_string() { if let Some(text) = term.selection_to_string() {
return clipboard::write(text); return Command::batch([clipboard::write(text), self.update_focus()]);
} }
} }
} else { } else {
log::warn!("Failed to get focused pane"); log::warn!("Failed to get focused pane");
} }
return self.update_focus();
} }
Message::DefaultFont(index) => { Message::DefaultFont(index) => {
match self.font_names.get(index) { match self.font_names.get(index) {
@ -1149,6 +1150,7 @@ impl Application for App {
terminal.select_all(); terminal.select_all();
} }
} }
return self.update_focus();
} }
Message::ShowHeaderBar(show_headerbar) => { Message::ShowHeaderBar(show_headerbar) => {
if show_headerbar != self.config.show_headerbar { if show_headerbar != self.config.show_headerbar {