From cab30c44fce7fe773a312dbc36a54dfd97cde391 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Fri, 2 Jun 2023 10:44:10 +0200 Subject: [PATCH] adding the third state 'click and hover' --- src/vs/editor/contrib/hover/browser/hover.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 90c541b86cf..4a9a6f6bc80 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -199,6 +199,14 @@ export class ModesHoverController implements IEditorContribution { return; } } + } else if (decoratorActivatedOn === 'click and hover') { + console.log('entered into the third case'); + if (!this._activatedByColorDecoratorClick) { + if (!this._isHoverEnabled) { + this._hideWidgets(); + return; + } + } } else { throw new Error('Invalid value for EditorOption.colorDecoratorsActivatedOn'); }