mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +00:00
dc10fd8c44
Frequent updates to `TextContent` while the screen is being refreshed can trigger an out-of-bounds access: an update with a smaller string being performed between calls to `compute_rows()` and `draw()` on TextView will cause an out-of-bounds access when slicing the string at `Segment::resolve`. This change fixes the issue by caching the content value when performing size calculations and using this cached content when drawing the view. Some additional changes were also made to reuse `TextContent` invalidation code on `TextView` and wrap content data with `RefCell<Arc<..>>` to enable sharing the inner string between `content_value` and `content_cache`. |
||
---|---|---|
.. | ||
box_view.rs | ||
button.rs | ||
canvas.rs | ||
checkbox.rs | ||
circular_focus.rs | ||
debug_view.rs | ||
dialog.rs | ||
dummy.rs | ||
edit_view.rs | ||
enableable_view.rs | ||
hideable_view.rs | ||
id_view.rs | ||
layer.rs | ||
linear_layout.rs | ||
list_view.rs | ||
menu_popup.rs | ||
menubar.rs | ||
mod.rs | ||
on_event_view.rs | ||
padded_view.rs | ||
panel.rs | ||
progress_bar.rs | ||
radio.rs | ||
scroll_view.rs | ||
select_view.rs | ||
shadow_view.rs | ||
sized_view.rs | ||
slider_view.rs | ||
stack_view.rs | ||
text_area.rs | ||
text_view.rs | ||
tracked_view.rs | ||
view_box.rs |