1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

Fix crash on cursor resize

Fixes #3960.
This commit is contained in:
Christian Duerr 2020-07-14 00:30:17 +00:00 committed by GitHub
parent 18cf806a27
commit 5424b30d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);