@@ -57,7 +57,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
57
57
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
58
58
import { ContextKeyExpr , IContextKey , IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
59
59
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
60
- import { ITextEditorOptions } from 'vs/platform/editor/common/editor' ;
60
+ import { ITextEditorOptions , TextEditorSelectionRevealType } from 'vs/platform/editor/common/editor' ;
61
61
import { IInstantiationService , ServicesAccessor } from 'vs/platform/instantiation/common/instantiation' ;
62
62
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection' ;
63
63
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
@@ -252,7 +252,7 @@ export class TestingPeekOpener extends Disposable implements ITestingPeekOpener
252
252
messageIndex : candidate . index ,
253
253
resultId : result . id ,
254
254
testExtId : test . item . extId ,
255
- } , undefined , { selection : candidate . location . range , ...options } ) ;
255
+ } , undefined , { selection : candidate . location . range , selectionRevealType : TextEditorSelectionRevealType . NearTopIfOutsideViewport , ...options } ) ;
256
256
return true ;
257
257
}
258
258
@@ -1023,7 +1023,8 @@ class TestResultsPeek extends PeekViewWidget {
1023
1023
}
1024
1024
1025
1025
this . show ( subject . revealLocation . range , TestResultsPeek . lastHeightInLines || hintMessagePeekHeight ( message ) ) ;
1026
- this . editor . revealPositionNearTop ( subject . revealLocation . range . getStartPosition ( ) , ScrollType . Smooth ) ;
1026
+ const startPosition = subject . revealLocation . range . getStartPosition ( ) ;
1027
+ this . editor . revealRangeNearTopIfOutsideViewport ( Range . fromPositions ( startPosition ) , ScrollType . Smooth ) ;
1027
1028
1028
1029
return this . showInPlace ( subject ) ;
1029
1030
}
0 commit comments