Commit d4003d1d authored by Link Mauve's avatar Link Mauve

Replace two lists of characters with strings.

parent 332a5c25
......@@ -21,8 +21,7 @@ from theming import to_curses_attr, read_tuple
FORMAT_CHAR = '\x19'
# These are non-printable chars, so they should never appear in the input,
# I guess. But maybe we can find better chars that are even less risky.
format_chars = ['\x0E', '\x0F', '\x10', '\x11', '\x12', '\x13',
'\x14', '\x15', '\x16', '\x17', '\x18']
format_chars = '\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18'
# different colors allowed in the input
allowed_color_digits = ('0', '1', '2', '3', '4', '5', '6', '7')
......
......@@ -30,7 +30,7 @@ class Input(Win):
passing the list of items that can be used to complete. The completion can be used
in a very flexible way.
"""
text_attributes = ['b', 'o', 'u', '1', '2', '3', '4', '5', '6', '7', 't']
text_attributes = 'bou1234567t'
clipboard = '' # A common clipboard for all the inputs, this makes
# it easy cut and paste text between various input
def __init__(self):
......@@ -463,8 +463,7 @@ class Input(Win):
(\x0E to \x19 instead of \x19 + attr). We do not use any }
char in this version
"""
chars = format_chars[:]
chars.append('\n')
chars = format_chars + '\n'
if y is not None and x is not None:
self.move(y, x)
format_char = find_first_format_char(text, chars)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment