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

Minor optimizations and fix lines being cut when newlines are in the string #43

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

Conversation

niekschoemaker
Copy link

Listening to the Menu Keys seems unecessary when the key is 0, and this thread uses quite a bit of resources with the native calls, so simply returning when the key is zero seems like a good options here.

The other commit changes the line split to a regex, this might be more performant (haven't tested that), but the main point with this is that if new lines are in the string it would still cut off the string, that seems unecessary, this fixes that by also seeing new lines as whitespace characters and replacing the new line with a new line giving you more control over where the new lines are.

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