diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 176033bb0e..614ced6253 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -749,15 +749,23 @@ void Tabular::set_row_column_number_info() numberofcells = 0; for (row_type row = 0; row < rows_; ++row) { for (col_type column = 0; column < columns_; ++column) { + + // If on its left is either the edge, or a normal cell, + // then this cannot be a non-begin multicol cell. + // Clean up as well as we can: + if (cell_info[row][column].multicolumn + == CELL_PART_OF_MULTICOLUMN) { + if (column == 0 || + cell_info[row][column - 1] + .multicolumn == CELL_NORMAL) + cell_info[row][column].multicolumn = + CELL_NORMAL; + } + // Count only non-multicol cells plus begin multicol + // cells, ignore non-begin multicol cells: if (cell_info[row][column].multicolumn != Tabular::CELL_PART_OF_MULTICOLUMN) ++numberofcells; - if (numberofcells == 0) - // FIXME: Is this intended? - cell_info[row][column].cellno = npos; - else - cell_info[row][column].cellno = - numberofcells - 1; } } diff --git a/status.15x b/status.15x index 3fe4f592c6..a3a4a089ab 100644 --- a/status.15x +++ b/status.15x @@ -48,6 +48,7 @@ What's new 'Load' to 'Edit' in the child document dialog. (Bugs 4107 and 4111) - Fix bug 4112: Do roman numerals beyond 20. +- Fix bug 580: Some malformed tables are now rendered correctly. - Enable File -> Revert when the file is externally modified, and rename this menu item to File -> Revert to saved. (Bugs 3766 and 4114)