diff --git a/docs/changelog.md b/docs/changelog.md index 990fdfb8b..d9014bb4c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -44,6 +44,7 @@ As features stabilize some brief notes about them will accumulate here. * Padding could show window background rather than pane background around split panes at certain window sizes [#2210](https://github.com/wez/wezterm/issues/2210) * Loading dynamic escape sequence scripts from the [iTerm2-Color-Scheme dynamic-colors directory](https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/dynamic-colors) would only apply the first 7 colors * Unix: Clicking a URL when no browser is open could cause wezterm to hang until the newly opened browser is closed. [#2245](https://github.com/wez/wezterm/issues/2245) +* Quickselect: now selects the bottom-most match rather than the top-most match. [#2250](https://github.com/wez/wezterm/issues/2250) #### Updated * Bundled harfbuzz to 4.4.1 diff --git a/wezterm-gui/src/overlay/quickselect.rs b/wezterm-gui/src/overlay/quickselect.rs index e23af839a..42dec1391 100644 --- a/wezterm-gui/src/overlay/quickselect.rs +++ b/wezterm-gui/src/overlay/quickselect.rs @@ -604,7 +604,7 @@ impl QuickSelectRenderable { } }; - self.by_label.insert(label.clone(), result_index); + self.by_label.entry(label.clone()).or_insert(result_index); for idx in res.start_y..=res.end_y { let range = if idx == res.start_y && idx == res.end_y { // Range on same line