From 4f2532492957cd207343bf8222d8652493945c03 Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Mon, 5 Feb 2024 19:35:03 +0100 Subject: [PATCH] Make sure to grab focus after context menu --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c814f8c..2aa0719 100644 --- a/src/main.rs +++ b/src/main.rs @@ -919,12 +919,13 @@ impl Application for App { let terminal = terminal.lock().unwrap(); let term = terminal.term.lock(); if let Some(text) = term.selection_to_string() { - return clipboard::write(text); + return Command::batch([clipboard::write(text), self.update_focus()]); } } } else { log::warn!("Failed to get focused pane"); } + return self.update_focus(); } Message::DefaultFont(index) => { match self.font_names.get(index) { @@ -1149,6 +1150,7 @@ impl Application for App { terminal.select_all(); } } + return self.update_focus(); } Message::ShowHeaderBar(show_headerbar) => { if show_headerbar != self.config.show_headerbar {