1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

quickselect: select bottom-most match

We don't really know which of the on-screen matches the user was
looking at when they selected the text, but assume that the one
nearest the bottom of the viewport is the one they want to select,
rather than the one closest to the top.

refs: https://github.com/wez/wezterm/issues/2250
This commit is contained in:
Wez Furlong 2022-07-12 08:17:14 -07:00
parent cc4364ca40
commit 79d2f8197b
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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