gyscos / cursive

A Text User Interface library for the Rust programming language
MIT License
4.26k stars 243 forks source link

[BUG] Panic when resizing the Terminal too small #731

Open FriederHannenheim opened 1 year ago

FriederHannenheim commented 1 year ago

Describe the bug

thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`: Was promised 2, received 1', /home/fried/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive_core-0.3.7/src/views/edit_view.rs:513:9

To Reproduce Create a layout with an edit view and resize the terminal very small

Expected behavior It doesn't crash and when I resize it back to big the layout is still there

Environment

Additional context Terminal used: Alacritty

gyscos commented 1 year ago

Hi, and thanks for the report! Will have a look.

gyscos commented 4 months ago

Would you happen to have an example that can cause the crash? I'm trying with the edit example, but it doesn't seem to crash when resized as small as possible.