allow any character in edit_str
This commit is contained in:
@@ -190,11 +190,10 @@ class ElectrumGui:
|
|||||||
|
|
||||||
|
|
||||||
def edit_str(self, target, c, is_num=False):
|
def edit_str(self, target, c, is_num=False):
|
||||||
chars = '0123456789.' if is_num else '0123456789.:;,!?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
if c==263 and target:
|
||||||
if curses.unctrl(c) in chars:
|
|
||||||
target += curses.unctrl(c)
|
|
||||||
elif c==263 and target:
|
|
||||||
target = target[:-1]
|
target = target[:-1]
|
||||||
|
elif not is_num or curses.unctrl(c) in '0123456789.':
|
||||||
|
target += curses.unctrl(c)
|
||||||
return target
|
return target
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user