summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-29 22:43:21 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-29 22:43:21 (EDT)
commitcd5a652edd730ba8a52f72880f73eeee1913022e (patch)
treecd1ef14ec92d78ff66068d60f6fe638d8194db59
parente5e13af6d540235a0818406f8751883e63b9675b (diff)
downloadfirman.sh-cd5a652edd730ba8a52f72880f73eeee1913022e.zip
firman.sh-cd5a652edd730ba8a52f72880f73eeee1913022e.tar.gz
firman.sh-cd5a652edd730ba8a52f72880f73eeee1913022e.tar.bz2
tui_show_prompt(): Place cursor at end of default input
-rw-r--r--src/ui/tui.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/tui.sh b/src/ui/tui.sh
index e0ae20b..0bc5da2 100644
--- a/src/ui/tui.sh
+++ b/src/ui/tui.sh
@@ -336,7 +336,7 @@ tui_show_prompt()
local i=
local iline=''
local bline=''
- local curpos=0
+ local curpos=
local focus=0
local key=
local mask=
@@ -364,6 +364,8 @@ tui_show_prompt()
i=$(($i + 1))
done
+ curpos=${#input}
+
# Event loop.
while :; do
# Draw a button.