fix(grid): do not crash when reflowing lines with an empty top buffer (#211)

This commit is contained in:
Aram Drevekenin 2021-02-25 18:20:01 +01:00 committed by GitHub
parent 6d623b3f1e
commit 54c500b230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,10 @@ fn transfer_rows_down(
} }
None => vec![Row::from_rows(next_lines)], None => vec![Row::from_rows(next_lines)],
}; };
if next_lines.is_empty() {
// no more lines at source, the line we popped was probably empty
break;
}
} }
None => break, // no more rows None => break, // no more rows
} }