Change the tertiary color in the default theme to white instead of grey.
Currently, the tertiary color is the same as the view background color,
making it invisible as foreground color. This makes the Outset effect
not work as (I think) intended.
NoBold (21) doesn't work in many terminals
22 (named NormalIntensity in crossterm, and NoFaint in termion) seems to do a better job.
Attempt at fixing #401.
Something is wrong at the moment when finishing up, when
the crossterm backend is used.
The terminal is left in a strange state: the previous contents of the
terminal (as before the program) are visible, however the cursor is
invisible (and reset to the top left), and clicking the mouse spams
escape codes.
For some reason the `execute!` block in `finish` is failing. But it
doesn't seem to be necessary: crossterm already restores the alternative
screen at shutdown, which also restores the original cursor position and
attributes.
Do make sure that mouse mode is stopped and that the cursor is visible.
* Add wrap_draw implementation for BoxView
This implementation was required because the restriction of fixed &
at least sized BoxView was not fulfilled with the default. The new
implementation takes this into consideration.
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`.