unified Jump-To and quick search behavior with regards to hoisting and opening in a new tab

This commit is contained in:
zadam
2022-01-10 20:44:59 +01:00
parent 6f406f9aa2
commit 91e78998d1
3 changed files with 9 additions and 8 deletions

View File

@@ -76,7 +76,10 @@ export default class RootCommandExecutor extends Component {
// force immediate search
await froca.loadSearchNote(searchNote.noteId);
const noteContext = await appContext.tabManager.openContextWithNote(searchNote.noteId, true);
const activeNoteContext = appContext.tabManager.getActiveContext();
const hoistedNoteId = activeNoteContext?.hoistedNoteId || 'root';
const noteContext = await appContext.tabManager.openContextWithNote(searchNote.noteId, true, null, hoistedNoteId);
appContext.triggerCommand('focusOnSearchDefinition', {ntxId: noteContext.ntxId});
}