Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming hideWidgets to hideGlyphHover in GlyphHoverController #236089

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/vs/editor/contrib/hover/browser/glyphHoverController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut
this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));
this._listenersStore.add(this._editor.onDidChangeModel(() => {
this._cancelScheduler();
this._hideWidgets();
this.hideGlyphHover();
}));
this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));
this._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));
Expand All @@ -110,7 +110,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut

private _onEditorScrollChanged(e: IScrollEvent): void {
if (e.scrollTopChanged || e.scrollLeftChanged) {
this._hideWidgets();
this.hideGlyphHover();
}
}

Expand All @@ -120,7 +120,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut
if (shouldNotHideCurrentHoverWidget) {
return;
}
this._hideWidgets();
this.hideGlyphHover();
}

private _isMouseOnGlyphHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean {
Expand Down Expand Up @@ -148,7 +148,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut
if (_sticky) {
return;
}
this._hideWidgets();
this.hideGlyphHover();
}

private _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean {
Expand Down Expand Up @@ -183,7 +183,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut
if (_sticky) {
return;
}
this._hideWidgets();
this.hideGlyphHover();
}

private _tryShowHoverWidget(mouseEvent: IEditorMouseEvent): boolean {
Expand All @@ -202,10 +202,10 @@ export class GlyphHoverController extends Disposable implements IEditorContribut
// Do not hide hover when a modifier key is pressed
return;
}
this._hideWidgets();
this.hideGlyphHover();
}

private _hideWidgets(): void {
public hideGlyphHover(): void {
if (_sticky) {
return;
}
Expand All @@ -219,10 +219,6 @@ export class GlyphHoverController extends Disposable implements IEditorContribut
return this._glyphWidget;
}

public hideContentHover(): void {
this._hideWidgets();
}

public override dispose(): void {
super.dispose();
this._unhookListeners();
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/contrib/chat/browser/codeBlockPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export class CodeBlockPart extends Disposable {

private clearWidgets() {
ContentHoverController.get(this.editor)?.hideContentHover();
GlyphHoverController.get(this.editor)?.hideContentHover();
GlyphHoverController.get(this.editor)?.hideGlyphHover();
}

private async updateEditor(data: ICodeBlockData): Promise<void> {
Expand Down Expand Up @@ -741,8 +741,8 @@ export class CodeCompareBlockPart extends Disposable {
private clearWidgets() {
ContentHoverController.get(this.diffEditor.getOriginalEditor())?.hideContentHover();
ContentHoverController.get(this.diffEditor.getModifiedEditor())?.hideContentHover();
GlyphHoverController.get(this.diffEditor.getOriginalEditor())?.hideContentHover();
GlyphHoverController.get(this.diffEditor.getModifiedEditor())?.hideContentHover();
GlyphHoverController.get(this.diffEditor.getOriginalEditor())?.hideGlyphHover();
GlyphHoverController.get(this.diffEditor.getModifiedEditor())?.hideGlyphHover();
}

private async updateEditor(data: ICodeCompareBlockData, token: CancellationToken): Promise<void> {
Expand Down
Loading