From b6cfca110cc90a5da88e7409aa60cdfa1fefad72 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 25 Nov 2020 14:19:05 -0800 Subject: on_resize --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 1792dfb..ac3d8cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -185,6 +185,7 @@ impl Bk<'_> { match event::read()? { Event::Key(e) => view.on_key(self, e.code), + Event::Mouse(e) => view.on_mouse(self, e), Event::Resize(cols, rows) => { self.rows = rows as usize; if cols != self.cols { @@ -194,8 +195,8 @@ impl Bk<'_> { c.lines = wrap(&c.text, width); } } + view.on_resize(self); } - Event::Mouse(e) => view.on_mouse(self, e), } } -- cgit v1.2.3