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 issue 198 #200

Conversation

phaedrus-jaf
Copy link
Contributor

len(string) returns bytes, not number of runes, so the "detect single character" clause breaks when passed a multibyte UTF-8 encoding. Casting to rune[] causes it to count runes, and then we can correctly detect the "there is one character in the string" case.

Tested by setting up a multibyte key binding, and then using tmux send-keys -t <pane-specifier> to send key presses to amfora. Looks like this fixes it entirely.

@makew0rld
Copy link
Owner

Awesome, thank you!

@makew0rld makew0rld merged commit 809d7fd into makew0rld:master Feb 21, 2021
makew0rld added a commit that referenced this pull request Feb 21, 2021
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