Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Imms <2193314+Tyriar@users.noreply.github.com>2022-07-19 17:54:18 +0300
committerDaniel Imms <2193314+Tyriar@users.noreply.github.com>2022-07-19 17:54:18 +0300
commitbecd1f58bcb464277ee3b3c1c38df68e61c97767 (patch)
tree73bbed1a87ce14d7540852afbde73abe69695118 /src
parentf8aeb2013e6184b64bfd7455f5df6799c7c30a11 (diff)
Fix shell integration left padding on splits and editors
Fixes #153570
Diffstat (limited to 'src')
-rw-r--r--src/vs/workbench/contrib/terminal/browser/terminalView.ts20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/vs/workbench/contrib/terminal/browser/terminalView.ts b/src/vs/workbench/contrib/terminal/browser/terminalView.ts
index bb3b8225a5f..4b2212066f1 100644
--- a/src/vs/workbench/contrib/terminal/browser/terminalView.ts
+++ b/src/vs/workbench/contrib/terminal/browser/terminalView.ts
@@ -112,11 +112,11 @@ export class TerminalViewPane extends ViewPane {
this._terminalTabbedView?.rerenderTabs();
}
}));
- _configurationService.onDidChangeConfiguration(e => {
- if (e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationsEnabled) || e.affectsConfiguration(TerminalSettingId.ShellIntegrationEnabled)) {
- this._updateForShellIntegration();
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
+ if (this._parentDomElement && (e.affectsConfiguration(TerminalSettingId.ShellIntegrationDecorationsEnabled) || e.affectsConfiguration(TerminalSettingId.ShellIntegrationEnabled))) {
+ this._updateForShellIntegration(this._parentDomElement);
}
- });
+ }));
this._register(this._terminalService.onDidCreateInstance((i) => {
i.capabilities.onDidAddCapability(c => {
if (c === TerminalCapability.CommandDetection && !this._gutterDecorationsEnabled()) {
@@ -124,15 +124,10 @@ export class TerminalViewPane extends ViewPane {
}
});
}));
- this._updateForShellIntegration();
}
- private _updateForShellIntegration() {
- if (this._gutterDecorationsEnabled()) {
- this._parentDomElement?.classList.add('shell-integration');
- } else {
- this._parentDomElement?.classList.remove('shell-integration');
- }
+ private _updateForShellIntegration(container: HTMLElement) {
+ container.classList.toggle('shell-integration', this._gutterDecorationsEnabled());
}
private _gutterDecorationsEnabled(): boolean {
@@ -143,6 +138,9 @@ export class TerminalViewPane extends ViewPane {
override renderBody(container: HTMLElement): void {
super.renderBody(container);
+ if (!this._parentDomElement) {
+ this._updateForShellIntegration(container);
+ }
this._parentDomElement = container;
this._parentDomElement.classList.add('integrated-terminal');
this._fontStyleElement = document.createElement('style');