From cba83cf513e1bce4efe68284fc65f7658bc505f1 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Fri, 13 Dec 2024 18:33:33 +0100 Subject: [PATCH] renaming hideWidgets to hideGlyphHover in GlyphHoverController --- .../hover/browser/glyphHoverController.ts | 18 +++++++----------- .../contrib/chat/browser/codeBlockPart.ts | 6 +++--- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/contrib/hover/browser/glyphHoverController.ts b/src/vs/editor/contrib/hover/browser/glyphHoverController.ts index c0d37ae82e020..9048716322a21 100644 --- a/src/vs/editor/contrib/hover/browser/glyphHoverController.ts +++ b/src/vs/editor/contrib/hover/browser/glyphHoverController.ts @@ -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))); @@ -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(); } } @@ -120,7 +120,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut if (shouldNotHideCurrentHoverWidget) { return; } - this._hideWidgets(); + this.hideGlyphHover(); } private _isMouseOnGlyphHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean { @@ -148,7 +148,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut if (_sticky) { return; } - this._hideWidgets(); + this.hideGlyphHover(); } private _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean { @@ -183,7 +183,7 @@ export class GlyphHoverController extends Disposable implements IEditorContribut if (_sticky) { return; } - this._hideWidgets(); + this.hideGlyphHover(); } private _tryShowHoverWidget(mouseEvent: IEditorMouseEvent): boolean { @@ -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; } @@ -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(); diff --git a/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts b/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts index 6f34a50203b34..c5ca386f9cf43 100644 --- a/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts +++ b/src/vs/workbench/contrib/chat/browser/codeBlockPart.ts @@ -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 { @@ -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 {