From b4b2b103289ef446bdbf2128154a312e7ef2e788 Mon Sep 17 00:00:00 2001 From: Friedrich Stoltzfus Date: Tue, 22 Apr 2025 16:12:09 -0400 Subject: [PATCH] macOS: command pallete scroll improvements Removes the withAnimation closure which caused flashing when scrolling up or down with arrow keys. Also removes the center anchor to behave more like other command palletes (e.g., Zed, Raycast). --- .../Sources/Features/Command Palette/CommandPalette.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/macos/Sources/Features/Command Palette/CommandPalette.swift b/macos/Sources/Features/Command Palette/CommandPalette.swift index cad93aa22..471281128 100644 --- a/macos/Sources/Features/Command Palette/CommandPalette.swift +++ b/macos/Sources/Features/Command Palette/CommandPalette.swift @@ -177,11 +177,8 @@ fileprivate struct CommandTable: View { .frame(maxHeight: 200) .onChange(of: selectedIndex) { _ in guard selectedIndex < options.count else { return } - withAnimation { - proxy.scrollTo( - options[Int(selectedIndex)].id, - anchor: .center) - } + proxy.scrollTo( + options[Int(selectedIndex)].id) } } }