lastColumn of a table must also be adjusted when columns are deleted. Fixes #736

This commit is contained in:
Oliver 2022-11-13 19:07:20 +01:00
parent 12a29444c8
commit 04a46906d2
1 changed files with 3 additions and 0 deletions

View File

@ -329,6 +329,9 @@ func (t *tableDefaultContent) RemoveColumn(column int) {
} }
t.cells[row] = append(t.cells[row][:column], t.cells[row][column+1:]...) t.cells[row] = append(t.cells[row][:column], t.cells[row][column+1:]...)
} }
if column >= 0 && column <= t.lastColumn {
t.lastColumn--
}
} }
// InsertRow inserts a new row at the given position. // InsertRow inserts a new row at the given position.