Skip to content

Commit 74c6f5d

Browse files
committed
minor fix
1 parent 90cced9 commit 74c6f5d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/pretty-csv.c

-2
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,6 @@ read_and_format(Options *opts, DataDesc *desc, StateData *state)
15541554
desc->last_row = desc->total_rows - 1;
15551555

15561556
desc->footer_row = desc->last_row;
1557-
desc->footer_rows = 1;
15581557

15591558
if (pconfig.border == 2)
15601559
{
@@ -1650,7 +1649,6 @@ read_and_format(Options *opts, DataDesc *desc, StateData *state)
16501649
desc->last_row = desc->total_rows - 1;
16511650

16521651
desc->footer_row = desc->last_row;
1653-
desc->footer_rows = 1;
16541652

16551653
if (pconfig.border == 2)
16561654
{

src/pspg.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,10 @@ create_layout(Options *opts,
608608
data_rows = scrdesc->main_maxy - scrdesc->fix_rows_rows;
609609
}
610610

611-
scrdesc->footer_rows = min_int(data_rows - scrdesc->rows_rows,
612-
desc->last_row - desc->footer_row + 1);
611+
/*
612+
* Footer window fill all remaining space.
613+
*/
614+
scrdesc->footer_rows = data_rows - scrdesc->rows_rows;
613615

614616
if (scrdesc->footer_rows > 0)
615617
{
@@ -622,8 +624,7 @@ create_layout(Options *opts,
622624
}
623625
else if (desc->headline_transl != NULL)
624626
{
625-
scrdesc->rows_rows = min_int(scrdesc->main_maxy - scrdesc->fix_rows_rows,
626-
desc->last_row - desc->first_data_row + 1);
627+
scrdesc->rows_rows = scrdesc->main_maxy - scrdesc->fix_rows_rows;
627628
}
628629
else
629630
{

src/pspg.h

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ typedef struct
142142
int fixed_rows; /* number of fixed rows */
143143
int fixed_columns; /* number of fixed columns */
144144
int data_rows; /* number of data rows */
145-
int footer_rows; /* number of footer rows */
146145
bool oid_name_table; /* detected system table with first oid column */
147146
bool multilines_already_tested; /* true, when we know where are multilines */
148147
bool has_multilines; /* true, when some field contains more lines */

0 commit comments

Comments
 (0)