diff options
author | Christian Duerr <contact@christianduerr.com> | 2023-11-03 05:50:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-03 04:50:45 +0000 |
commit | 46f8e39880592edb47f9b54f3f34ebbcfaa01c61 (patch) | |
tree | e87d4a275a53f366afdb8af2a92e44f7c7c54e57 /alacritty/src/event.rs | |
parent | 609499640f4c45ac6ff1f7c7e1b100dea3e88858 (diff) | |
download | r-alacritty-46f8e39880592edb47f9b54f3f34ebbcfaa01c61.tar.gz r-alacritty-46f8e39880592edb47f9b54f3f34ebbcfaa01c61.tar.bz2 r-alacritty-46f8e39880592edb47f9b54f3f34ebbcfaa01c61.zip |
Fix crash when leaving search after resize
This fixes a crash which could occur when leaving search with a visible
match after shrinking the terminal height to be lower than the original
line the focused match was in.
Closes #7054.
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r-- | alacritty/src/event.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 281bcace..beab7c74 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -154,6 +154,11 @@ impl SearchState { self.focused_match.as_ref() } + /// Clear the focused match. + pub fn clear_focused_match(&mut self) { + self.focused_match = None; + } + /// Active search dfas. pub fn dfas(&mut self) -> Option<&mut RegexSearch> { self.dfas.as_mut() |