Refactored into a widget to enable asynchronous

update of the zle buffer
This commit is contained in:
Thiago de Arruda
2013-10-29 14:27:42 -03:00
parent 911730c1e4
commit 6d2146a542
3 changed files with 73 additions and 49 deletions

View File

@@ -35,10 +35,10 @@ handle-request() {
# send the longest completion back to the client, strip the last
# non-printable character
if (( $#current )); then
print -u $connection - ${current:0:-1}
print -u $connection - $prefix$'\2'${current:0:-1}
else
print -u $connection ''
fi
# signal that we're done
print -u $connection ''
# clear input buffer
zpty -w z $'\n'
break # handle more requests/return to zselect