diff options
author | P. J. McDermott <pj@pehjota.net> | 2015-10-29 15:22:42 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2015-10-29 15:22:42 (EDT) |
commit | df96c6a78618f47c7b14cb8338cd500dbcce6dfe (patch) | |
tree | 5bea4c71e56319fbb9f664a9953a0981c890b054 | |
parent | e814ef8d097f391b5c65772cf35b72f9ade1475e (diff) | |
download | firman.sh-df96c6a78618f47c7b14cb8338cd500dbcce6dfe.zip firman.sh-df96c6a78618f47c7b14cb8338cd500dbcce6dfe.tar.gz firman.sh-df96c6a78618f47c7b14cb8338cd500dbcce6dfe.tar.bz2 |
tui_show_prompt(): Limit inserts by input length, not cursor position
-rw-r--r-- | src/ui/tui.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/tui.sh b/src/ui/tui.sh index 76da51c..2a9a1cd 100644 --- a/src/ui/tui.sh +++ b/src/ui/tui.sh @@ -434,7 +434,7 @@ tui_show_prompt() "${cmd}")" ;; KEY_SPACE) - [ ${curpos} -lt ${len} ] || continue + [ ${#input} -lt ${len} ] || continue key=' ' i=0 mask='' @@ -458,7 +458,7 @@ tui_show_prompt() ;; KEY_*);; *) - [ ${curpos} -lt ${len} ] || continue + [ ${#input} -lt ${len} ] || continue i=0 mask='' while [ ${i} -lt ${curpos} ]; do |