From 6bb0812a3995dcedd18612250c4be306f38c97c3 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Tue, 16 Jan 2018 10:30:26 -0800 Subject: [PATCH] TextArea: invalidate cache on set_content --- src/views/text_area.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/text_area.rs b/src/views/text_area.rs index d255772..d746b4c 100644 --- a/src/views/text_area.rs +++ b/src/views/text_area.rs @@ -95,6 +95,7 @@ impl TextArea { } if let Some(size) = self.size_cache.map(|s| s.map(|s| s.value)) { + self.invalidate(); self.compute_rows(size); } } @@ -227,6 +228,7 @@ impl TextArea { fn soft_compute_rows(&mut self, size: Vec2) { if self.is_cache_valid(size) { + debug!("Cache is still valid."); return; } debug!("Computing! Oh yeah!");