@@ -89,29 +89,29 @@ export interface IShell {
8989export class TerminalConfigHelper {
9090 public panelContainer : Builder ;
9191
92- private charMeasureElement : HTMLElement ;
92+ private _charMeasureElement : HTMLElement ;
9393
9494 public constructor (
95- private platform : Platform ,
96- @IConfigurationService private configurationService : IConfigurationService ) {
95+ private _platform : Platform ,
96+ @IConfigurationService private _configurationService : IConfigurationService ) {
9797 }
9898
9999 public getTheme ( baseThemeId : string ) : string [ ] {
100100 return DEFAULT_ANSI_COLORS [ baseThemeId ] ;
101101 }
102102
103- private measureFont ( fontFamily : string , fontSize : number , lineHeight : number ) : ITerminalFont {
103+ private _measureFont ( fontFamily : string , fontSize : number , lineHeight : number ) : ITerminalFont {
104104 // Create charMeasureElement if it hasn't been created or if it was orphaned by its parent
105- if ( ! this . charMeasureElement || ! this . charMeasureElement . parentElement ) {
106- this . charMeasureElement = this . panelContainer . div ( ) . getHTMLElement ( ) ;
105+ if ( ! this . _charMeasureElement || ! this . _charMeasureElement . parentElement ) {
106+ this . _charMeasureElement = this . panelContainer . div ( ) . getHTMLElement ( ) ;
107107 }
108- let style = this . charMeasureElement . style ;
108+ let style = this . _charMeasureElement . style ;
109109 style . display = 'block' ;
110110 style . fontFamily = fontFamily ;
111111 style . fontSize = fontSize + 'px' ;
112112 style . height = Math . floor ( lineHeight * fontSize ) + 'px' ;
113- this . charMeasureElement . innerText = 'X' ;
114- let rect = this . charMeasureElement . getBoundingClientRect ( ) ;
113+ this . _charMeasureElement . innerText = 'X' ;
114+ let rect = this . _charMeasureElement . getBoundingClientRect ( ) ;
115115 style . display = 'none' ;
116116 let charWidth = Math . ceil ( rect . width ) ;
117117 let charHeight = Math . ceil ( rect . height ) ;
@@ -129,8 +129,8 @@ export class TerminalConfigHelper {
129129 * terminal.integrated.fontSize, terminal.integrated.lineHeight configuration properties
130130 */
131131 public getFont ( ) : ITerminalFont {
132- let terminalConfig = this . configurationService . getConfiguration < ITerminalConfiguration > ( ) . terminal . integrated ;
133- let editorConfig = this . configurationService . getConfiguration < IConfiguration > ( ) ;
132+ let terminalConfig = this . _configurationService . getConfiguration < ITerminalConfiguration > ( ) . terminal . integrated ;
133+ let editorConfig = this . _configurationService . getConfiguration < IConfiguration > ( ) ;
134134
135135 let fontFamily = terminalConfig . fontFamily || editorConfig . editor . fontFamily ;
136136 let fontSize = this . toInteger ( terminalConfig . fontSize , 0 ) || editorConfig . editor . fontSize ;
@@ -139,39 +139,39 @@ export class TerminalConfigHelper {
139139 }
140140 let lineHeight = this . toInteger ( terminalConfig . lineHeight , DEFAULT_LINE_HEIGHT ) ;
141141
142- return this . measureFont ( fontFamily , fontSize , lineHeight <= 0 ? DEFAULT_LINE_HEIGHT : lineHeight ) ;
142+ return this . _measureFont ( fontFamily , fontSize , lineHeight <= 0 ? DEFAULT_LINE_HEIGHT : lineHeight ) ;
143143 }
144144
145145 public getFontLigaturesEnabled ( ) : boolean {
146- let terminalConfig = this . configurationService . getConfiguration < ITerminalConfiguration > ( ) . terminal . integrated ;
146+ let terminalConfig = this . _configurationService . getConfiguration < ITerminalConfiguration > ( ) . terminal . integrated ;
147147 return terminalConfig . fontLigatures ;
148148 }
149149
150150 public getCursorBlink ( ) : boolean {
151- let terminalConfig = this . configurationService . getConfiguration < ITerminalConfiguration > ( ) . terminal . integrated ;
151+ let terminalConfig = this . _configurationService . getConfiguration < ITerminalConfiguration > ( ) . terminal . integrated ;
152152 return terminalConfig . cursorBlinking ;
153153 }
154154
155155 public getShell ( ) : IShell {
156- let config = this . configurationService . getConfiguration < ITerminalConfiguration > ( ) ;
156+ let config = this . _configurationService . getConfiguration < ITerminalConfiguration > ( ) ;
157157 let shell : IShell = {
158158 executable : '' ,
159159 args : [ ]
160160 } ;
161- if ( this . platform === Platform . Windows ) {
161+ if ( this . _platform === Platform . Windows ) {
162162 shell . executable = config . terminal . integrated . shell . windows ;
163- } else if ( this . platform === Platform . Mac ) {
163+ } else if ( this . _platform === Platform . Mac ) {
164164 shell . executable = config . terminal . integrated . shell . osx ;
165165 shell . args = config . terminal . integrated . shellArgs . osx ;
166- } else if ( this . platform === Platform . Linux ) {
166+ } else if ( this . _platform === Platform . Linux ) {
167167 shell . executable = config . terminal . integrated . shell . linux ;
168168 shell . args = config . terminal . integrated . shellArgs . linux ;
169169 }
170170 return shell ;
171171 }
172172
173173 public isSetLocaleVariables ( ) : boolean {
174- let config = this . configurationService . getConfiguration < ITerminalConfiguration > ( ) ;
174+ let config = this . _configurationService . getConfiguration < ITerminalConfiguration > ( ) ;
175175 return config . terminal . integrated . setLocaleVariables ;
176176 }
177177
@@ -187,7 +187,7 @@ export class TerminalConfigHelper {
187187 }
188188
189189 public getCommandsToSkipShell ( ) : string [ ] {
190- let config = this . configurationService . getConfiguration < ITerminalConfiguration > ( ) ;
190+ let config = this . _configurationService . getConfiguration < ITerminalConfiguration > ( ) ;
191191 return config . terminal . integrated . commandsToSkipShell ;
192192 }
193193}
0 commit comments