File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
vs/workbench/contrib/terminalContrib Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 32
32
" vs/platform/files/browser/htmlFileSystemProvider.ts" ,
33
33
" vs/platform/files/browser/webFileSystemAccess.ts" ,
34
34
" vs/platform/telemetry/*" ,
35
- " vs/platform/assignment/*"
35
+ " vs/platform/assignment/*" ,
36
+ " vs/platform/terminal/*"
36
37
]
37
38
}
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import type { Terminal } from 'xterm';
28
28
29
29
class TextAreaSyncContribution extends DisposableStore implements ITerminalContribution {
30
30
static readonly ID = 'terminal.textAreaSync' ;
31
- private _xterm : IXtermTerminal & { raw : Terminal } | undefined ;
32
31
static get ( instance : ITerminalInstance ) : TextAreaSyncContribution | null {
33
32
return instance . getContribution < TextAreaSyncContribution > ( TextAreaSyncContribution . ID ) ;
34
33
}
Original file line number Diff line number Diff line change @@ -110,7 +110,6 @@ registerTerminalAction({
110
110
111
111
class DevModeContribution extends DisposableStore implements ITerminalContribution {
112
112
static readonly ID = 'terminal.devMode' ;
113
- devModeClass = 'dev-mode' ;
114
113
private _xterm : IXtermTerminal & { raw : Terminal } | undefined ;
115
114
static get ( instance : ITerminalInstance ) : DevModeContribution | null {
116
115
return instance . getContribution < DevModeContribution > ( DevModeContribution . ID ) ;
@@ -123,16 +122,18 @@ class DevModeContribution extends DisposableStore implements ITerminalContributi
123
122
super ( ) ;
124
123
this . add ( this . _configurationService . onDidChangeConfiguration ( e => {
125
124
if ( e . affectsConfiguration ( TerminalSettingId . DevMode ) ) {
126
- const devMode : boolean = this . _configurationService . getValue ( TerminalSettingId . DevMode ) || false ;
127
- this . _xterm ?. raw . element ?. classList . toggle ( this . devModeClass , devMode ) ;
125
+ this . _updateDevMode ( ) ;
128
126
}
129
127
} ) ) ;
130
128
}
131
129
xtermReady ( xterm : IXtermTerminal & { raw : Terminal } ) : void {
132
130
this . _xterm = xterm ;
133
- if ( this . _configurationService . getValue ( TerminalSettingId . DevMode ) ) {
134
- this . _xterm . raw . element ?. classList . add ( this . devModeClass ) ;
135
- }
131
+ this . _updateDevMode ( ) ;
132
+ }
133
+
134
+ private _updateDevMode ( ) {
135
+ const devMode : boolean = this . _configurationService . getValue ( TerminalSettingId . DevMode ) || false ;
136
+ this . _xterm ?. raw . element ?. classList . toggle ( 'dev-mode' , devMode ) ;
136
137
}
137
138
}
138
139
registerTerminalContribution ( DevModeContribution . ID , DevModeContribution ) ;
You can’t perform that action at this time.
0 commit comments