tview icon indicating copy to clipboard operation
tview copied to clipboard

Table.RemoveColumn() does not update lastColumn

Open cespedes opened this issue 3 years ago • 0 comments

When removing a column in a table by calling RemoveColumn(), even if the removal is successful, the table continues to have the same number of columns.

A simple fix is to include these lines at the end of func (t *tableDefaultContent) RemoveColumn (table.go line 332):

if column <= t.lastColumn {
        t.lastColumn--
}

I can prepare a pull request if you prefer.

cespedes avatar Jun 24 '22 12:06 cespedes