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

fix: split line based on width of viewport #625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ahmed-hassan99
Copy link

Fix content rendering in viewport by splitting each line based on viewport width.

Previous implementation had a bug where lines exceeding the width would show in the viewport on multiple lines but the number of lines len(m.lines) would not reflect that. This results in the viewport rendering less lines than intended since line count is purely based on \n regardless of how many lines the content actually occupies on the terminal.

Added iteration through each line to split the line to fit within viewport width
@Ahmed-hassan99
Copy link
Author

@meowgorithm
Let me know if anything needs to change for PR description/ commit message.

PS It's my first open source PR so not sure if there's any standards/guidelines I missed

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