From c8884c41da23f989f01c2c6e3fb91ec362b23594 Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Wed, 25 May 2022 09:04:27 +0100 Subject: [PATCH] fix jump in the same file --- lapce-data/src/data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lapce-data/src/data.rs b/lapce-data/src/data.rs index 590ca75c..2497486e 100644 --- a/lapce-data/src/data.rs +++ b/lapce-data/src/data.rs @@ -2037,13 +2037,13 @@ fn get_editor_from_tab( ctx: &mut EventCtx, editor_tab_id: WidgetId, path: Option, - _scratch: bool, + scratch: bool, config: &Config, ) -> &mut LapceEditorData { let editor_tab = Arc::make_mut(self.editor_tabs.get_mut(&editor_tab_id).unwrap()); - if !config.editor.show_tab { + if !config.editor.show_tab || (path.is_none() && !scratch) { if let EditorTabChild::Editor(id, _, _) = editor_tab.active_child() { return Arc::make_mut(self.editors.get_mut(id).unwrap()); }