@@ -505,21 +505,20 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
505
505
private _ensureSuggestWidget ( terminal : Terminal ) : SimpleSuggestWidget {
506
506
this . _terminalSuggestWidgetVisibleContextKey . set ( true ) ;
507
507
if ( ! this . _suggestWidget ) {
508
+ const c = this . _terminalConfigurationService . config ;
509
+ const font = this . _terminalConfigurationService . getFont ( dom . getActiveWindow ( ) ) ;
510
+ const fontInfo = {
511
+ fontFamily : font . fontFamily ,
512
+ fontSize : font . fontSize ,
513
+ lineHeight : Math . ceil ( 1.5 * font . fontSize ) ,
514
+ fontWeight : c . fontWeight . toString ( ) ,
515
+ letterSpacing : font . letterSpacing
516
+ } ;
508
517
this . _suggestWidget = this . _register ( this . _instantiationService . createInstance (
509
518
SimpleSuggestWidget ,
510
519
this . _panel ! ,
511
520
this . _instantiationService . createInstance ( PersistedWidgetSize ) ,
512
- ( ) => {
513
- const c = this . _terminalConfigurationService . config ;
514
- const font = this . _terminalConfigurationService . getFont ( dom . getActiveWindow ( ) ) ;
515
- return {
516
- fontFamily : font . fontFamily ,
517
- fontSize : font . fontSize ,
518
- lineHeight : Math . ceil ( 1.5 * font . fontSize ) ,
519
- fontWeight : c . fontWeight . toString ( ) ,
520
- letterSpacing : font . letterSpacing
521
- } ;
522
- } ,
521
+ ( ) => fontInfo ,
523
522
{ }
524
523
) ) ;
525
524
this . _suggestWidget . list . style ( getListStyles ( {
0 commit comments