diff --git a/lapce-app/src/window_tab.rs b/lapce-app/src/window_tab.rs index c096f3ba..5e22d402 100644 --- a/lapce-app/src/window_tab.rs +++ b/lapce-app/src/window_tab.rs @@ -1400,6 +1400,35 @@ pub fn run_internal_command(&self, cmd: InternalCommand) { } InternalCommand::FocusEditorTab { editor_tab_id } => { self.main_split.active_editor_tab.set(Some(editor_tab_id)); + let editor_tab = self + .main_split + .editor_tabs + .with_untracked(|tabs| tabs.get(&editor_tab_id).cloned()); + let tab_info = editor_tab + .unwrap() + .get() + .children + .get(editor_tab.unwrap().get().active) + .unwrap() + .2 + .view_info( + self.main_split.editors, + self.main_split.diff_editors, + self.plugin.clone(), + self.common.config, + ); + floem::action::set_window_title(format!( + "{} - {} - {} - Lapce", + tab_info.with(|tab| tab.path.clone()), + self.main_split + .common + .workspace + .path + .clone() + .unwrap() + .display(), + self.main_split.common.workspace.kind, + )); } InternalCommand::SetColorTheme { name, save } => { if save {