File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
src/vs/editor/contrib/suggest/browser Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ export class SuggestWidget implements IDisposable {
105
105
private _isAuto : boolean = false ;
106
106
private _loadingTimeout ?: IDisposable ;
107
107
private _pendingLayout ?: IDisposable ;
108
+ private _pendingShowDetails ?: IDisposable ;
108
109
private _currentSuggestionDetails ?: CancelablePromise < void > ;
109
110
private _focusedItem ?: CompletionItem ;
110
111
private _ignoreFocusEvents : boolean = false ;
@@ -697,15 +698,19 @@ export class SuggestWidget implements IDisposable {
697
698
}
698
699
699
700
showDetails ( loading : boolean ) : void {
700
- this . _details . show ( ) ;
701
- if ( loading ) {
702
- this . _details . widget . renderLoading ( ) ;
703
- } else {
704
- this . _details . widget . renderItem ( this . _list . getFocusedElements ( ) [ 0 ] , this . _explainMode ) ;
705
- }
706
- this . _positionDetails ( ) ;
707
- this . editor . focus ( ) ;
708
- this . element . domNode . classList . add ( 'shows-details' ) ;
701
+ this . _pendingShowDetails ?. dispose ( ) ;
702
+ this . _pendingShowDetails = dom . runAtThisOrScheduleAtNextAnimationFrame ( ( ) => {
703
+ this . _pendingShowDetails = undefined ;
704
+ this . _details . show ( ) ;
705
+ if ( loading ) {
706
+ this . _details . widget . renderLoading ( ) ;
707
+ } else {
708
+ this . _details . widget . renderItem ( this . _list . getFocusedElements ( ) [ 0 ] , this . _explainMode ) ;
709
+ }
710
+ this . _positionDetails ( ) ;
711
+ this . editor . focus ( ) ;
712
+ this . element . domNode . classList . add ( 'shows-details' ) ;
713
+ } ) ;
709
714
}
710
715
711
716
toggleExplainMode ( ) : void {
You can’t perform that action at this time.
0 commit comments