diff options
author | Joe Wilm <joe@jwilm.com> | 2017-08-21 10:59:45 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2017-08-21 10:59:45 -0700 |
commit | 471237d2ced1d1a07de06d832b2902efbc237df9 (patch) | |
tree | e89dd70badb60ae0d99d91d3c315656bd254f26c /src/event.rs | |
parent | 5009566ea5c46a85fa243b18ce4b7fe8e0b89b62 (diff) | |
download | alacritty-471237d2ced1d1a07de06d832b2902efbc237df9.tar.gz alacritty-471237d2ced1d1a07de06d832b2902efbc237df9.zip |
Fix panic when resizing
The selection might have a beginning or end that is outside the bounds
after a resize and cause a panic on subsequent draws. Easy solution is
to just clear the selection on resize.
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs index f91b3129..4cfd0d57 100644 --- a/src/event.rs +++ b/src/event.rs @@ -194,6 +194,7 @@ pub struct Processor<N> { impl<N> OnResize for Processor<N> { fn on_resize(&mut self, size: &SizeInfo) { self.size_info = size.to_owned(); + self.selection = None; } } |