From 6827d2ed59c81e80bfd5bfb14037f8e943969cad Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Wed, 3 Aug 2016 00:01:18 -0700 Subject: [PATCH] Update scrollbase on any row computation --- src/views/text_area.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/text_area.rs b/src/views/text_area.rs index 68de657..fa04ead 100644 --- a/src/views/text_area.rs +++ b/src/views/text_area.rs @@ -213,6 +213,7 @@ impl TextArea { if !self.rows.is_empty() { self.last_size = Some(SizeCache::build(size, size)); } + self.scrollbase.set_heights(size.y, self.rows.len()); } fn backspace(&mut self) { @@ -346,7 +347,6 @@ impl TextArea { // Here, we know it's just no gonna happen. self.invalidate(); self.compute_rows(size); - self.scrollbase.set_heights(size.y, self.rows.len()); return; } @@ -456,6 +456,5 @@ impl View for TextArea { fn layout(&mut self, size: Vec2) { self.compute_rows(size); - self.scrollbase.set_heights(size.y, self.rows.len()); } }