diff options
author | wustho <benawiadha@gmail.com> | 2020-04-17 17:31:26 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-04-17 17:31:26 +0700 |
commit | 3dd383d6f929dc7e5b44d43e61b58774f843829d (patch) | |
tree | ffd204e806ddb12fbf16bffa45a12bc78c78e24d /epy.py | |
parent | 390c7e4675a48d0c6835d024dd6391a3640f801b (diff) | |
download | epy-3dd383d6f929dc7e5b44d43e61b58774f843829d.tar.gz |
Added maxlen=25 to input_prompt().
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -657,7 +657,7 @@ def help(): return "Help", src, K["Help"] -def input_prompt(prompt): +def input_prompt(prompt, maxlen=25): rows, cols = SCREEN.getmaxyx() stat = curses.newwin(1, cols, rows-1, 0) if COLORSUPPORT: @@ -695,7 +695,7 @@ def input_prompt(prompt): curses.echo(0) curses.curs_set(0) return curses.KEY_RESIZE - else: + elif len(init_text) <= maxlen: init_text += chr(ipt) stat.clear() |