From aea3ab47f5d820198b0f68d34b3846b483f9e809 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 19 Dec 2024 14:07:44 +0100 Subject: [PATCH] Fix compilation errors --- .../editor/contrib/hover/browser/contentHoverController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/hover/browser/contentHoverController.ts b/src/vs/editor/contrib/hover/browser/contentHoverController.ts index 11ddb36fa83..acbabe6a83e 100644 --- a/src/vs/editor/contrib/hover/browser/contentHoverController.ts +++ b/src/vs/editor/contrib/hover/browser/contentHoverController.ts @@ -22,6 +22,7 @@ import { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js'; import './hover.css'; import { Emitter } from '../../../../base/common/event.js'; import { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPicker.js'; +import { KeyCode } from '../../../../base/common/keyCodes.js'; // sticky hover widget which doesn't disappear on focus out and such const _sticky = false @@ -235,14 +236,14 @@ export class ContentHoverController extends Disposable implements IEditorContrib } private _onKeyDown(e: IKeyboardEvent): void { - if (!this._editor.hasModel()) { + if (!this._contentWidget) { return; } const isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e); if (isPotentialKeyboardShortcut) { return; } - if (this._contentWidget.isFocused && event.keyCode === KeyCode.Tab) { + if (this._contentWidget.isFocused && e.keyCode === KeyCode.Tab) { return; } this.hideContentHover();