fix empty row deletion

This commit is contained in:
Brian Hung
2025-07-23 00:00:53 -07:00
committed by Nicolás Hatcher Andrés
parent b07603b728
commit a2181a5a48
2 changed files with 23 additions and 0 deletions

View File

@@ -924,6 +924,10 @@ impl UserModel {
// Collect diffs from bottom to top so that `undo` re-inserts rows
// in the correct order (top to bottom).
for r in (row..row + row_count).rev() {
if !is_valid_row(r) {
return Err(format!("Row number '{r}' is not valid."));
}
let mut row_data = None;
for rd in &worksheet.rows {
if rd.r == r {