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 Terminal Character Bugs. #60

Merged
merged 12 commits into from
Jan 12, 2024
Merged

Conversation

figuerom16
Copy link
Contributor

@figuerom16 figuerom16 commented Jan 10, 2024

Fix for #9
The buffer cuts some chars in half since UTF-8 isn't always 1 byte.
Returning the byte and prepending it to the next buffer fixes the issue.
Also changed bufLen from 4069 to 4096.

Added:
If columns or rows changes during handleOutput then break loop.
It looked like output was being fully rendered for every size change which was sluggish.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch thanks, just a question inline about reducing appends.

term.go Outdated Show resolved Hide resolved
@figuerom16
Copy link
Contributor Author

figuerom16 commented Jan 10, 2024

This is having some issues still. More of the buffer is getting through than I want.
EDIT: Fixed it. Needed to update increase num by the length of leftOver to get the terminal to refresh correctly.

@figuerom16 figuerom16 changed the title Fix Terminal Character Bugs Fix Terminal Character Bugs and Speed up for multiple resizes. Jan 10, 2024
Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, not sure about one of the optimisations though.

output.go Outdated Show resolved Hide resolved
@figuerom16 figuerom16 changed the title Fix Terminal Character Bugs and Speed up for multiple resizes. Fix Terminal Character Bugs. Jan 10, 2024
@figuerom16
Copy link
Contributor Author

Refresh not Resize for the previous commit.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :) I appreciate your work on this project

@andydotxyz andydotxyz merged commit e2276e7 into fyne-io:master Jan 12, 2024
5 checks passed
@figuerom16 figuerom16 deleted the charbugs branch January 12, 2024 21:37
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.

2 participants