Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pager class #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Refactor pager class #132

wants to merge 2 commits into from

Conversation

harro
Copy link
Collaborator

@harro harro commented Mar 23, 2025

While preparing the 2.0.0 release I noticed some inconsistent Pager behaviour.
I subsequently ran into trouble trying to localise the issue by adding tests...
So I spent the weekend refactoring the Pager class to make unit testing easier. I added many more tests, then found and resolved several issues.

Issue(s) resolved:
SetLines was being ignored
Percent was conditionally displayed
Only every 2nd 'enter' key was being registered by tty.read
Prompt string did not truncate on narrow terminals
Added support for MS Windows

Apologies for the lengthy CL - I combined it all together so we can proceed with system/regression test as part of this CL review.

@harro harro requested a review from buxtronix March 23, 2025 08:22
@harro harro self-assigned this Mar 23, 2025
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@harro harro mentioned this pull request Mar 24, 2025
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.

1 participant