You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This unwrap will probably cause a panic when we resize twice without drawing in between.
We could probably get the height with self.update_total_visible_lines instead of unwrapping self.lines_height, which would fix the issue, but I think a better fix would be to delay calculating the scroll value until needed, similar to line heights. There seems to be no reason to compute scroll values eagerly on resize while line heights are only computed when drawing. Why not do both when drawing?
The text was updated successfully, but these errors were encountered:
Originally discussed in #356 (review)
tiny/crates/libtiny_tui/src/msg_area/mod.rs
Line 77 in 8f4428e
This
unwrap
will probably cause a panic when we resize twice without drawing in between.We could probably get the height with
self.update_total_visible_lines
instead of unwrappingself.lines_height
, which would fix the issue, but I think a better fix would be to delay calculating the scroll value until needed, similar to line heights. There seems to be no reason to compute scroll values eagerly on resize while line heights are only computed when drawing. Why not do both when drawing?The text was updated successfully, but these errors were encountered: