From ce95d7e826341a81c2e39be7083a0691965a7824 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 18 Sep 2020 18:12:21 +0200 Subject: [PATCH] tune hover behavior to allow alt to switch from debug hover to regular hover and that the mouse move does not hide the regular hover fixes #84561 --- src/vs/editor/contrib/hover/hover.ts | 3 +-- .../workbench/contrib/debug/browser/debugEditorContribution.ts | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/hover/hover.ts b/src/vs/editor/contrib/hover/hover.ts index 01b4416ffc54c..ad75081cfcb83 100644 --- a/src/vs/editor/contrib/hover/hover.ts +++ b/src/vs/editor/contrib/hover/hover.ts @@ -78,7 +78,6 @@ export class ModesHoverController implements IEditorContribution { this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { if (e.hasChanged(EditorOption.hover)) { - this._hideWidgets(); this._unhookEvents(); this._hookEvents(); } @@ -100,7 +99,7 @@ export class ModesHoverController implements IEditorContribution { this._toUnhook.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e))); this._toUnhook.add(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged())); } else { - this._toUnhook.add(this._editor.onMouseMove(hideWidgetsEventHandler)); + this._toUnhook.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e))); this._toUnhook.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e))); } diff --git a/src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts b/src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts index b542a23788f67..de9fb51967e9d 100644 --- a/src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts +++ b/src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts @@ -269,9 +269,6 @@ export class DebugEditorContribution implements IDebugEditorContribution { this.altPressed = false; this.editor.updateOptions({ hover: { enabled: false } }); listener.dispose(); - if (this.hoverRange && debugHoverWasVisible) { - this.showHover(this.hoverRange, false); - } } }); }