mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-04-17 11:35:31 +08:00
s/unset/=/g
This commit is contained in:
parent
a411ef3e09
commit
eee37543a8
@ -292,7 +292,7 @@ _zsh_autosuggest_toggle() {
|
||||
# Clear the suggestion
|
||||
_zsh_autosuggest_clear() {
|
||||
# Remove the suggestion
|
||||
unset POSTDISPLAY
|
||||
POSTDISPLAY=
|
||||
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
}
|
||||
@ -309,7 +309,7 @@ _zsh_autosuggest_modify() {
|
||||
local orig_postdisplay="$POSTDISPLAY"
|
||||
|
||||
# Clear suggestion while waiting for next one
|
||||
unset POSTDISPLAY
|
||||
POSTDISPLAY=
|
||||
|
||||
# Original widget may modify the buffer
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
@ -364,7 +364,7 @@ _zsh_autosuggest_suggest() {
|
||||
if [[ -n "$suggestion" ]] && (( $#BUFFER )); then
|
||||
POSTDISPLAY="${suggestion#$BUFFER}"
|
||||
else
|
||||
unset POSTDISPLAY
|
||||
POSTDISPLAY=
|
||||
fi
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ _zsh_autosuggest_accept() {
|
||||
BUFFER="$BUFFER$POSTDISPLAY"
|
||||
|
||||
# Remove the suggestion
|
||||
unset POSTDISPLAY
|
||||
POSTDISPLAY=
|
||||
|
||||
# Run the original widget before manually moving the cursor so that the
|
||||
# cursor movement doesn't make the widget do something unexpected
|
||||
@ -413,7 +413,7 @@ _zsh_autosuggest_execute() {
|
||||
BUFFER="$BUFFER$POSTDISPLAY"
|
||||
|
||||
# Remove the suggestion
|
||||
unset POSTDISPLAY
|
||||
POSTDISPLAY=
|
||||
|
||||
# Call the original `accept-line` to handle syntax highlighting or
|
||||
# other potential custom behavior
|
||||
|
Loading…
Reference in New Issue
Block a user