From 471237d2ced1d1a07de06d832b2902efbc237df9 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Mon, 21 Aug 2017 10:59:45 -0700 Subject: 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. --- src/event.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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 { impl OnResize for Processor { fn on_resize(&mut self, size: &SizeInfo) { self.size_info = size.to_owned(); + self.selection = None; } } -- cgit