diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-05-09 20:44:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 20:44:14 +0000 |
commit | 0936aa6e8d319094c63ea8a79715c732b0fd4902 (patch) | |
tree | 04746ace2bff0a70faf03324a05d065d76a38bd2 /alacritty/src/display/hint.rs | |
parent | f9d83a28368f4582727160876bd2361afe61708b (diff) | |
download | r-alacritty-0936aa6e8d319094c63ea8a79715c732b0fd4902.tar.gz r-alacritty-0936aa6e8d319094c63ea8a79715c732b0fd4902.tar.bz2 r-alacritty-0936aa6e8d319094c63ea8a79715c732b0fd4902.zip |
Fix unnecessary redraws due to hint highlighting
When the mouse cursor is moved by at least one cell, an update to the
highlighted hints is triggered automatically. Previously this would
always update the hints and redraw Alacritty regardless of the actualy
change to the hint highlighting.
By checking if the hint highlighting has actually changed, pointless
redraws can be prevented. This is especially helpful since mouse motions
often generate a lot of hint re-computations.
Diffstat (limited to 'alacritty/src/display/hint.rs')
-rw-r--r-- | alacritty/src/display/hint.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty/src/display/hint.rs b/alacritty/src/display/hint.rs index 5e770bcf..6d61b094 100644 --- a/alacritty/src/display/hint.rs +++ b/alacritty/src/display/hint.rs @@ -165,7 +165,7 @@ impl HintState { } /// Hint match which was selected by the user. -#[derive(Debug, Clone)] +#[derive(PartialEq, Debug, Clone)] pub struct HintMatch { /// Action for handling the text. pub action: HintAction, |