Skip to content

Commit d0a9afc

Browse files
committed
cleanup
1 parent a99f4cb commit d0a9afc

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/vs/editor/contrib/hover/browser/contentHoverController.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,10 @@ export class ContentHoverController extends Disposable implements IEditorContrib
269269
if (this._ignoreMouseEvents) {
270270
return;
271271
}
272-
// New behavior: if hover is configured for keyboard modifier and the user presses the triggering modifier
273272
// we should show the hover immediately for the current (last known) mouse location even without moving the mouse again.
274273
if (this._hoverSettings.enabled === 'onKeyboardModifier' && this._mouseMoveEvent) {
275-
const multiCursorModifier = this._editor.getOption(EditorOption.multiCursorModifier); // 'altKey' | 'ctrlKey' | 'metaKey'
276-
const triggerPressed = isTriggerModifierPressed(multiCursorModifier, e);
277-
if (triggerPressed) {
274+
const multiCursorModifier = this._editor.getOption(EditorOption.multiCursorModifier);
275+
if (isTriggerModifierPressed(multiCursorModifier, e)) {
278276
// Avoid re-trigger if already visible
279277
if (!this._contentWidget?.isVisible) {
280278
// Get the position/range from the last mouse event and show hover immediately

src/vs/editor/contrib/hover/browser/hoverUtils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,5 @@ export function shouldShowHover(
5151
if (hoverEnabled === 'off') {
5252
return false;
5353
}
54-
// onKeyboardModifier
5554
return isTriggerModifierPressed(multiCursorModifier, mouseEvent.event);
5655
}

0 commit comments

Comments
 (0)