diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-07-14 00:30:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 00:30:17 +0000 |
commit | 5424b30d228816de4a40c610915789db254a0e34 (patch) | |
tree | bd244a0b51521873163b7bd8ce4a4fc59341fcf5 | |
parent | 18cf806a27f06185b1ceb2d63f3b9bc2dd3dc80e (diff) | |
download | alacritty-5424b30d228816de4a40c610915789db254a0e34.tar.gz alacritty-5424b30d228816de4a40c610915789db254a0e34.zip |
Fix crash on cursor resize
Fixes #3960.
-rw-r--r-- | alacritty_terminal/src/grid/resize.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty_terminal/src/grid/resize.rs b/alacritty_terminal/src/grid/resize.rs index 079fcf19..725b7079 100644 --- a/alacritty_terminal/src/grid/resize.rs +++ b/alacritty_terminal/src/grid/resize.rs @@ -273,7 +273,7 @@ impl<T: GridCell + Default + PartialEq + Copy> Grid<T> { // Remove wide char spacer before shrinking. let len = wrapped.len(); - if wrapped[len - 1].flags().contains(Flags::LEADING_WIDE_CHAR_SPACER) { + if len > 0 && wrapped[len - 1].flags().contains(Flags::LEADING_WIDE_CHAR_SPACER) { if len == 1 { row[cols - 1].flags_mut().insert(Flags::WRAPLINE); new_raw.push(row); |