cursive/src/views
Leonardo Lang dc10fd8c44 Fix out-of-bounds access on TextView
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`.
2019-08-01 20:29:50 -04:00
..
box_view.rs Rustfmt 2019-07-30 16:08:40 -07:00
button.rs Fix clippy warnings 2019-03-04 10:31:36 -08:00
canvas.rs Fix clippy warning 2019-03-20 17:05:18 -07:00
checkbox.rs Rustfmt 2019-07-30 16:08:40 -07:00
circular_focus.rs Update to Rust 2018 2019-02-28 15:54:12 -08:00
debug_view.rs Fix clippy warnings 2019-03-04 10:31:36 -08:00
dialog.rs Rustfmt 2019-07-30 16:08:40 -07:00
dummy.rs Run cargo fix --edition-idioms 2019-02-28 15:55:10 -08:00
edit_view.rs Rename repo name to use lowercase 2019-06-19 14:39:11 -04:00
enableable_view.rs Run cargo fix --edition-idioms 2019-02-28 15:55:10 -08:00
hideable_view.rs Rustfmt 2019-07-30 16:08:40 -07:00
id_view.rs Rustfmt 2019-07-30 16:08:40 -07:00
layer.rs Run cargo fix --edition-idioms 2019-02-28 15:55:10 -08:00
linear_layout.rs Rustfmt 2019-07-30 16:08:40 -07:00
list_view.rs Add ListView::remove_child 2019-07-26 15:36:19 -07:00
menu_popup.rs Refactor scroll::Core mechanism. 2019-03-12 14:31:56 -07:00
menubar.rs Rustfmt 2019-07-30 16:08:40 -07:00
mod.rs Add CursiveLogger and DebugView 2019-02-22 12:38:16 -08:00
on_event_view.rs Remove "extern crate" and rustfmt 2019-02-28 16:04:14 -08:00
padded_view.rs Run cargo fix --edition-idioms 2019-02-28 15:55:10 -08:00
panel.rs Reduce the title drawing cut-off point by 2 characters. 2019-03-03 10:37:53 +01:00
progress_bar.rs Rustfmt 2019-07-30 16:08:40 -07:00
radio.rs Rustfmt 2019-07-30 16:08:40 -07:00
scroll_view.rs Add ScrollView::{inner_size, is_at_{bottom, top, left, right}} 2019-06-23 21:53:11 -04:00
select_view.rs Rustfmt 2019-07-30 16:08:40 -07:00
shadow_view.rs Run cargo fix --edition-idioms 2019-02-28 15:55:10 -08:00
sized_view.rs Update to Rust 2018 2019-02-28 15:54:12 -08:00
slider_view.rs Add getters for current and max value in SliderView (#353) 2019-06-07 09:47:48 -07:00
stack_view.rs Rustfmt 2019-07-30 16:08:40 -07:00
text_area.rs Crossterm Performance Update (#361) 2019-07-30 09:48:50 -07:00
text_view.rs Fix out-of-bounds access on TextView 2019-08-01 20:29:50 -04:00
tracked_view.rs Remove "extern crate" and rustfmt 2019-02-28 16:04:14 -08:00
view_box.rs Remove "extern crate" and rustfmt 2019-02-28 16:04:14 -08:00