fix(terminal): clear retained overlay for editor tabs (#11030)
This commit is contained in:
parent
84c70d6e29
commit
dbbeae3512
|
|
@ -48,6 +48,17 @@ describe('useColdParkedTerminalPresentation', () => {
|
|||
expect(presentedTargetId(hook.result)).toBe('b')
|
||||
})
|
||||
|
||||
it('clears the terminal presentation when the group activates non-terminal content', () => {
|
||||
const hook = renderPresentationHook({
|
||||
desiredTargetId: 'a',
|
||||
coldParkedTargetIds: new Set()
|
||||
})
|
||||
|
||||
hook.rerender({ desiredTargetId: null, coldParkedTargetIds: new Set() })
|
||||
|
||||
expect(presentedTargetId(hook.result)).toBeNull()
|
||||
})
|
||||
|
||||
it('retains the prior target until a cold target settles', () => {
|
||||
const hook = renderPresentationHook({
|
||||
desiredTargetId: 'a',
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export function resolveColdParkedPresentation(
|
|||
presentedTargetId: null,
|
||||
pendingTargetId: null
|
||||
}
|
||||
if (entry.pendingTargetId === desiredTargetId) {
|
||||
if (entry.pendingTargetId !== null && entry.pendingTargetId === desiredTargetId) {
|
||||
next.set(scopeId, entry)
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue