@@ -22,6 +22,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
2222import { editorHoverBackground , editorHoverBorder , textCodeBlockBackground , textLinkForeground , editorHoverForeground } from 'vs/platform/theme/common/colorRegistry' ;
2323import { HIGH_CONTRAST , registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
2424import { ParameterHintsModel , TriggerContext } from 'vs/editor/contrib/parameterHints/parameterHintsModel' ;
25+ import { pad } from 'vs/base/common/strings' ;
2526
2627const $ = dom . $ ;
2728
@@ -76,18 +77,17 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget {
7677 const wrapper = dom . append ( element , $ ( '.wrapper' ) ) ;
7778 wrapper . tabIndex = - 1 ;
7879
79- const buttons = dom . append ( wrapper , $ ( '.buttons' ) ) ;
80- const previous = dom . append ( buttons , $ ( '.button.previous' ) ) ;
81- const next = dom . append ( buttons , $ ( '.button.next' ) ) ;
80+ const controls = dom . append ( wrapper , $ ( '.controls' ) ) ;
81+ const previous = dom . append ( controls , $ ( '.button.previous' ) ) ;
82+ const overloads = dom . append ( controls , $ ( '.overloads' ) ) ;
83+ const next = dom . append ( controls , $ ( '.button.next' ) ) ;
8284
8385 const onPreviousClick = stop ( domEvent ( previous , 'click' ) ) ;
8486 this . _register ( onPreviousClick ( this . previous , this ) ) ;
8587
8688 const onNextClick = stop ( domEvent ( next , 'click' ) ) ;
8789 this . _register ( onNextClick ( this . next , this ) ) ;
8890
89- const overloads = dom . append ( wrapper , $ ( '.overloads' ) ) ;
90-
9191 const body = $ ( '.body' ) ;
9292 const scrollbar = new DomScrollableElement ( body , { } ) ;
9393 this . _register ( scrollbar ) ;
@@ -239,12 +239,8 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget {
239239 dom . toggleClass ( this . domNodes . signature , 'has-docs' , hasDocs ) ;
240240 dom . toggleClass ( this . domNodes . docs , 'empty' , ! hasDocs ) ;
241241
242- let currentOverload = String ( hints . activeSignature + 1 ) ;
243- if ( hints . signatures . length < 10 ) {
244- currentOverload += `/${ hints . signatures . length } ` ;
245- }
246-
247- this . domNodes . overloads . textContent = currentOverload ;
242+ this . domNodes . overloads . textContent =
243+ pad ( hints . activeSignature + 1 , hints . signatures . length . toString ( ) . length ) + '/' + hints . signatures . length ;
248244
249245 if ( activeParameter ) {
250246 const labelToAnnounce = this . getParameterLabel ( signature , hints . activeParameter ) ;
0 commit comments