diff --git a/src/vs/workbench/contrib/terminal/browser/media/terminal.css b/src/vs/workbench/contrib/terminal/browser/media/terminal.css index c32f1c421b0..a11d5cc80b7 100644 --- a/src/vs/workbench/contrib/terminal/browser/media/terminal.css +++ b/src/vs/workbench/contrib/terminal/browser/media/terminal.css @@ -285,10 +285,6 @@ border-style: solid; } -.xterm-screen .xterm-decoration-container .xterm-decoration.quick-fix { - z-index: 7; -} - .monaco-workbench .part.sidebar > .title > .title-actions .switch-terminal { display: flex; align-items: center; @@ -484,15 +480,6 @@ pointer-events: none; color: var(--vscode-terminalCommandDecoration-defaultBackground); } -.monaco-workbench .terminal .terminal-command-decoration.quick-fix { - color: var(--vscode-editorLightBulb-foreground) !important; - background-color: var(--vscode-terminal-background, var(--vscode-panel-background)); -} -.monaco-workbench .terminal .terminal-command-decoration.quick-fix.explainOnly { - /* Use success background to blend in with the terminal better as it's lower priority. We will - * probably want to add an explicit color for this eventually. */ - color: var(--vscode-terminalCommandDecoration-successBackground) !important; -} .terminal-scroll-highlight { left: 0; diff --git a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/media/terminalQuickFix.css b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/media/terminalQuickFix.css new file mode 100644 index 00000000000..11a54028fe5 --- /dev/null +++ b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/media/terminalQuickFix.css @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.xterm-screen .xterm-decoration-container .xterm-decoration.quick-fix { + z-index: 7; +} + +.monaco-workbench .terminal .terminal-command-decoration.quick-fix { + color: var(--vscode-editorLightBulb-foreground) !important; + background-color: var(--vscode-terminal-background, var(--vscode-panel-background)); +} + +.monaco-workbench .terminal .terminal-command-decoration.quick-fix.explainOnly { + /* Use success background to blend in with the terminal better as it's lower priority. We will + * probably want to add an explicit color for this eventually. */ + color: var(--vscode-terminalCommandDecoration-successBackground) !important; +} diff --git a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon.ts b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon.ts index 365dd9f00d1..697f6db5009 100644 --- a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon.ts +++ b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon.ts @@ -283,7 +283,7 @@ export class TerminalQuickFixAddon extends Disposable implements ITerminalAddon, updateLayout(this._configurationService, e); this._audioCueService.playAudioCue(AudioCue.terminalQuickFix); - const parentElement = e.parentElement?.parentElement?.parentElement?.parentElement; + const parentElement = e.closest('.xterm') as HTMLElement; if (!parentElement) { return; } diff --git a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution.ts b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution.ts index 96f2fccd74f..4fca04ec9a9 100644 --- a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution.ts +++ b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import 'vs/css!./media/terminalQuickFix'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { localize } from 'vs/nls';