allow underscore in names

pull/22/head
Jake Funke 2018-11-14 23:24:34 +00:00
parent 2212596e5e
commit c5e0bbaef8
1 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ class CursedMenu(object):
if user_in == -1: # Input comes from pipe/file and is closed if user_in == -1: # Input comes from pipe/file and is closed
raise IOError raise IOError
## DEBUG KEYS - enable these lines to see curses key codes ## DEBUG KEYS - enable these lines to see curses key codes
# self.screen.addstr(1, 1, str(user_in), curses.A_NORMAL) # self.screen.addstr(2, 2, str(user_in), curses.A_NORMAL)
# self.screen.refresh() # self.screen.refresh()
# Resize sends curses.KEY_RESIZE, update display # Resize sends curses.KEY_RESIZE, update display
@ -707,7 +707,7 @@ class CursedMenu(object):
user_string = completer.complete(direction) user_string = completer.complete(direction)
self.screen.addstr(ypos, xpos, " " * (self.maxx-xpos-1)) self.screen.addstr(ypos, xpos, " " * (self.maxx-xpos-1))
elif user_input < 256 and user_input != 10: elif user_input < 256 and user_input != 10:
if filterfunc(chr(user_input)): if filterfunc(chr(user_input)) or chr(user_input) == '_':
user_string += chr(user_input) user_string += chr(user_input)
if completer: if completer:
completer.update_input(user_string) completer.update_input(user_string)