Skip to content

Commit

Permalink
tune hover behavior to allow alt to switch from debug hover to regula…
Browse files Browse the repository at this point in the history
…r hover and that the mouse move does not hide the regular hover

fixes #84561
  • Loading branch information
isidorn committed Sep 18, 2020
1 parent c4aa010 commit ce95d7e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions src/vs/editor/contrib/hover/hover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
});
}
Expand Down

0 comments on commit ce95d7e

Please sign in to comment.