summaryrefslogtreecommitdiff
path: root/textscreen/txt_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'textscreen/txt_table.c')
-rw-r--r--textscreen/txt_table.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c
index ccf81db2..4c502c0c 100644
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -365,6 +365,15 @@ static void TXT_TableDrawer(TXT_UNCAST_ARG(table), int w, int selected)
CalcRowColSizes(table, row_heights, column_widths);
+ // If this table only has one column, expand column size to fit
+ // the display width. Ensures that separators reach the window edges
+ // when drawing windows.
+
+ if (table->columns == 1)
+ {
+ column_widths[0] = w;
+ }
+
// Draw all cells
draw_y = origin_y;