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

Add option to set "infinite" line length, which will let long lines either wrap or add horizontal scroll bars. #306

Open
gbmhunter opened this issue Feb 15, 2024 · 1 comment
Assignees

Comments

@gbmhunter
Copy link
Owner

Use case in when a user is pumping lots of data without new line chars, e.g. 2,345,56,45,1,2,3,.... Forcing new line chars in breaks the formatting if they then want to copy/paste this data into another program.

@gbmhunter gbmhunter self-assigned this Feb 15, 2024
@gbmhunter
Copy link
Owner Author

gbmhunter commented Feb 23, 2024

Having lines wrap will cause problems with react-window, which at the moment uses a known fixed height per "row" in the array of terminal data to work out what rows to render. react-window does support variable height rows, but I'm unsure at the moment if that will be enough to make this work.

Variable height demo of react-window at https://react-window.vercel.app/#/examples/list/variable-size

If we could determine the height of each row based on the width of the terminal and the amount of text in it, this might work. Could be hard to calculate the height correctly without actually rendering into the terminal to measure the height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant