Skip to content

feat(#188): add WithTargetHeight for fixed terminal-line pagination#227

Merged
wheelibin merged 1 commit into
mainfrom
feat-188
Jun 4, 2026
Merged

feat(#188): add WithTargetHeight for fixed terminal-line pagination#227
wheelibin merged 1 commit into
mainfrom
feat-188

Conversation

@wheelibin
Copy link
Copy Markdown
Collaborator

@wheelibin wheelibin commented Jun 3, 2026

  • Adds WithTargetHeight(h int) to constrain the table to an exact number of terminal lines, regardless of row content
  • Unlike WithPageSize (which counts rows), this builds a page map by summing actual rendered line heights — correct when WithMultiline is enabled and rows wrap to different
    heights
  • WithTargetHeight and WithPageSize are mutually exclusive

Resolves #129
Resolves #188

@wheelibin wheelibin force-pushed the feat-188 branch 8 times, most recently from 050cfc6 to 235d984 Compare June 4, 2026 09:22
@wheelibin wheelibin merged commit 31688b5 into main Jun 4, 2026
7 checks passed
@wheelibin wheelibin deleted the feat-188 branch June 4, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to set target height of a table? Flexible max number of rows based on size of the terminal

1 participant