This commit is contained in:
Loic Nageleisen 2012-08-14 17:58:09 +02:00
parent c4a905a1c5
commit b0c6665c2a

View file

@ -53,6 +53,8 @@ clear_incomplete_line() {
tput cup $row $col tput cup $row $col
# not on first column? clean up! (overwrites answer) # not on first column? clean up! (overwrites answer)
# we print a terminal width worth of columns, but since
# it goes too far, we backtrack with CR
[[ $col != 0 ]] && printf "\e[7m%%\e[m%*s\r" $((COLUMNS-1)) [[ $col != 0 ]] && printf "\e[7m%%\e[m%*s\r" $((COLUMNS-1))
# else e.g prompt will overwrite answer echo # else e.g prompt will overwrite answer echo
} }