From 5a932a6ac3fc431776c4fd9505f8b1f556be6699 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 9 Jan 2025 15:56:33 +0100 Subject: [PATCH] suggest - show previous item when reveal an in-the-middle item to indicate there are higher ranked suggestions (#237577) --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index e1bf843a994bd..0ad604159e1ae 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -570,7 +570,7 @@ export class SuggestWidget implements IDisposable { try { this._list.splice(0, this._list.length, this._completionModel.items); this._setState(isFrozen ? State.Frozen : State.Open); - this._list.reveal(selectionIndex, 0); + this._list.reveal(selectionIndex, 0, selectionIndex === 0 ? 0 : this.getLayoutInfo().itemHeight * 0.33); this._list.setFocus(noFocus ? [] : [selectionIndex]); } finally { this._onDidFocus.resume();