mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
TextArea: invalidate cache on set_content
This commit is contained in:
parent
868e59a4fa
commit
6bb0812a39
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user