X Tutup
Skip to content

Commit ea9966a

Browse files
committed
Repl.p_key: Check length of self.c before calling unicodedata.category.
1 parent d664538 commit ea9966a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bpython/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,8 +1562,7 @@ def p_key(self):
15621562
elif self.c == '\t':
15631563
return self.tab()
15641564

1565-
elif (not self.c.startswith('KEY_')
1566-
and not unicodedata.category(self.c) == 'Cc'):
1565+
elif len(self.c) == 1 and not unicodedata.category(self.c) == 'Cc':
15671566
self.addstr(self.c)
15681567
self.print_line(self.s)
15691568

0 commit comments

Comments
 (0)
X Tutup