fix jump in the same file

This commit is contained in:
Dongdong Zhou 2022-05-25 09:04:27 +01:00
parent aa67b7c274
commit c8884c41da
1 changed files with 2 additions and 2 deletions

View File

@ -2037,13 +2037,13 @@ fn get_editor_from_tab(
ctx: &mut EventCtx,
editor_tab_id: WidgetId,
path: Option<PathBuf>,
_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());
}