diff --git a/docs/changelog.md b/docs/changelog.md index e514c8322..bce777030 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -159,6 +159,8 @@ As features stabilize some brief notes about them will accumulate here. * x11/wayland: avoid including keysym name in deadkey compose cursor. #4511 * Mouse wheel scrolling now works correctly when hovering over the inactive pane. Thanks to @tradiff! #4339 #2373 +* Scrolling glitch in Command Palette, Launcher and InputSelector. Thanks to + @metiftikci! #4839 #### Updated * Bundled harfbuzz to 8.3.0 diff --git a/wezterm-gui/src/overlay/launcher.rs b/wezterm-gui/src/overlay/launcher.rs index 804ae592f..0b234dc53 100644 --- a/wezterm-gui/src/overlay/launcher.rs +++ b/wezterm-gui/src/overlay/launcher.rs @@ -451,7 +451,7 @@ impl LauncherState { fn move_down(&mut self) { self.active_idx = (self.active_idx + 1).min(self.filtered_entries.len() - 1); - if self.active_idx + self.top_row > self.max_items { + if self.active_idx > self.top_row + self.max_items { self.top_row = self.active_idx.saturating_sub(self.max_items); } } diff --git a/wezterm-gui/src/overlay/selector.rs b/wezterm-gui/src/overlay/selector.rs index d2bb0f46c..40d9f2250 100644 --- a/wezterm-gui/src/overlay/selector.rs +++ b/wezterm-gui/src/overlay/selector.rs @@ -188,7 +188,7 @@ impl SelectorState { fn move_down(&mut self) { self.active_idx = (self.active_idx + 1).min(self.filtered_entries.len() - 1); - if self.active_idx + self.top_row > self.max_items { + if self.active_idx > self.top_row + self.max_items { self.top_row = self.active_idx.saturating_sub(self.max_items); } }