mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Refactored into a widget to enable asynchronous
update of the zle buffer
This commit is contained in:
parent
911730c1e4
commit
6d2146a542
3 changed files with 73 additions and 49 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue