mirror of https://github.com/rivo/tview.git
lastColumn of a table must also be adjusted when columns are deleted. Fixes #736
This commit is contained in:
parent
12a29444c8
commit
04a46906d2
3
table.go
3
table.go
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue