Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Fix issue 198#200

Merged
makew0rld merged 1 commit intomakew0rld:masterfrom
phaedrus-jaf:jaf/issue-198-cannot-bind-utf8-characters
Feb 21, 2021
Merged

Fix issue 198#200
makew0rld merged 1 commit intomakew0rld:masterfrom
phaedrus-jaf:jaf/issue-198-cannot-bind-utf8-characters

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