cursive icon indicating copy to clipboard operation
cursive copied to clipboard

[BUG] Panic when resizing the Terminal too small

Open FriederHannenheim opened this issue 2 years ago • 5 comments

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

  • Linux
  • Backend used: crossterm
  • Current locale (run locale in a terminal)
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
  • Cursive version (from crates.io, from git, ...) 0.20.0 from crates.io

Additional context Terminal used: Alacritty

FriederHannenheim avatar May 03 '23 15:05 FriederHannenheim

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

gyscos avatar Jul 07 '23 14:07 gyscos

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.

gyscos avatar May 28 '24 17:05 gyscos