Use preserveFocus when focusing stack frames (#251964)

* Use preserveFocus when focusing stack frames

* Add preserveFocus in openEditor call for disassembly view
This commit is contained in:
Jason Kuo 2025-07-08 11:22:54 -05:00 committed by GitHub
parent 49e7cf8dbb
commit 8f023e48c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -542,10 +542,10 @@ export class StackFrame implements IStackFrame {
async openInEditor(editorService: IEditorService, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<IEditorPane | undefined> {
const threadStopReason = this.thread.stoppedDetails?.reason;
if (this.instructionPointerReference &&
(threadStopReason === 'instruction breakpoint' ||
(threadStopReason === 'step' && this.thread.lastSteppingGranularity === 'instruction') ||
((threadStopReason === 'instruction breakpoint' && !preserveFocus) ||
(threadStopReason === 'step' && this.thread.lastSteppingGranularity === 'instruction' && !preserveFocus) ||
editorService.activeEditor instanceof DisassemblyViewInput)) {
return editorService.openEditor(DisassemblyViewInput.instance, { pinned: true, revealIfOpened: true });
return editorService.openEditor(DisassemblyViewInput.instance, { pinned: true, revealIfOpened: true, preserveFocus });
}
if (this.source.available) {