Skip to content

Commit b38d701

Browse files
committed
feat: dynamically adjust page size based on terminal height
1 parent a5d276b commit b38d701

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

internal/tui/model.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,11 @@ func (m *Model) resizeTable() {
371371
h = 1
372372
}
373373
m.table.SetHeight(h)
374+
375+
// Ensure page size is at least 5 to avoid too small pages
376+
if h < 5 {
377+
h = 5
378+
}
379+
m.pageSize = h // Update page size based on new height
380+
m.updateTable() // Refresh table to apply new page size
374381
}

0 commit comments

Comments
 (0)