File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -430,6 +430,20 @@ func (m QueryModel) View() string {
430430 if pageSize < 1 {
431431 pageSize = 1
432432 }
433+ helpView := m .help .FullHelpView (helpKeys )
434+ helpHeight := lipgloss .Height (helpView )
435+
436+ // Step 3: calculate exact table page size so everything fits.
437+ tableAvail := m .height - headerHeight - helpHeight - statusHeight
438+ pageSize := tableAvail - 6
439+ if pageSize < 1 {
440+ pageSize = 1
441+ }
442+
443+ // Pad rows to pageSize so the table always fills its allocated height.
444+ // Empty rows render as blank lines inside the table border.
445+ displayRows := make ([]table.Row , pageSize )
446+ copy (displayRows , m .dataRows )
433447
434448 // Pad rows to pageSize so the table always fills its allocated height.
435449 // Empty rows render as blank lines inside the table border.
You can’t perform that action at this time.
0 commit comments