Skip to content

Commit 05de94e

Browse files
authored
Merge pull request microsoft#151185 from microsoft/tyriar/150842
Fix releasing alt sometimes not hiding locked hovers
2 parents 233d54c + ea381c9 commit 05de94e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/vs/workbench/services/hover/browser/hoverService.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export class HoverService implements IHoverService {
3838
const hoverDisposables = new DisposableStore();
3939
const hover = this._instantiationService.createInstance(HoverWidget, options);
4040
hover.onDispose(() => {
41-
this._currentHoverOptions = undefined;
41+
// Only clear the current options if it's the current hover, the current options help
42+
// reduce flickering when the same hover is shown multiple times
43+
if (this._currentHoverOptions === options) {
44+
this._currentHoverOptions = undefined;
45+
}
4246
hoverDisposables.dispose();
4347
});
4448
const provider = this._contextViewService as IContextViewProvider;

src/vs/workbench/services/hover/browser/hoverWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ export class HoverWidget extends Widget {
507507
}
508508

509509
class CompositeMouseTracker extends Widget {
510-
private _isMouseIn: boolean = false;
510+
private _isMouseIn: boolean = true;
511511
private _mouseTimeout: number | undefined;
512512

513513
private readonly _onMouseOut = this._register(new Emitter<void>());

0 commit comments

Comments
 (0)