gyscos / gyscos/cursive

[BUG] Panic when resizing the Terminal too small

Open
#731 5 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

**Describe the bug**
```
thread '' 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.