Skip to content

Commit 3a9f471

Browse files
authored
Fix KeyError in bin/wcwidth-browser for combining (#106)
Resolve KeyError when launching wcwidth-browser.py with default unicode_version of 'auto', then pressing 'c' (for combining characters):: File "/Users/jq/Code/wcwidth/bin/wcwidth-browser.py", line 120, in __init__ for (begin, end) in ZERO_WIDTH[unicode_version]: ~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'auto'
1 parent 9e0cedb commit 3a9f471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/wcwidth-browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __init__(self, width, unicode_version):
116116
"""
117117
self.characters = []
118118
letters_o = ('o' * width)
119-
for (begin, end) in ZERO_WIDTH[unicode_version]:
119+
for (begin, end) in ZERO_WIDTH[_wcmatch_version(unicode_version)]:
120120
for val in [_val for _val in
121121
range(begin, end + 1)
122122
if _val <= LIMIT_UCS]:

0 commit comments

Comments
 (0)