mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-25 10:01:05 +01:00
Move async initialization into start
function to keep in one place
This commit is contained in:
parent
78ba07179a
commit
f33b605a63
3 changed files with 6 additions and 4 deletions
|
@ -64,5 +64,3 @@ _zsh_autosuggest_async_recreate_pty() {
|
||||||
# Set up input handler from the pty
|
# Set up input handler from the pty
|
||||||
zle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_suggestion_ready
|
zle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_suggestion_ready
|
||||||
}
|
}
|
||||||
|
|
||||||
add-zsh-hook precmd _zsh_autosuggest_async_recreate_pty
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ _zsh_autosuggest_start() {
|
||||||
_zsh_autosuggest_feature_detect
|
_zsh_autosuggest_feature_detect
|
||||||
_zsh_autosuggest_check_deprecated_config
|
_zsh_autosuggest_check_deprecated_config
|
||||||
_zsh_autosuggest_bind_widgets
|
_zsh_autosuggest_bind_widgets
|
||||||
|
|
||||||
|
_zsh_autosuggest_async_recreate_pty
|
||||||
|
add-zsh-hook precmd _zsh_autosuggest_async_recreate_pty
|
||||||
}
|
}
|
||||||
|
|
||||||
add-zsh-hook precmd _zsh_autosuggest_start
|
add-zsh-hook precmd _zsh_autosuggest_start
|
||||||
|
|
|
@ -579,8 +579,6 @@ _zsh_autosuggest_async_recreate_pty() {
|
||||||
zle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_suggestion_ready
|
zle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_suggestion_ready
|
||||||
}
|
}
|
||||||
|
|
||||||
add-zsh-hook precmd _zsh_autosuggest_async_recreate_pty
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
# Start #
|
# Start #
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
|
@ -592,6 +590,9 @@ _zsh_autosuggest_start() {
|
||||||
_zsh_autosuggest_feature_detect
|
_zsh_autosuggest_feature_detect
|
||||||
_zsh_autosuggest_check_deprecated_config
|
_zsh_autosuggest_check_deprecated_config
|
||||||
_zsh_autosuggest_bind_widgets
|
_zsh_autosuggest_bind_widgets
|
||||||
|
|
||||||
|
_zsh_autosuggest_async_recreate_pty
|
||||||
|
add-zsh-hook precmd _zsh_autosuggest_async_recreate_pty
|
||||||
}
|
}
|
||||||
|
|
||||||
add-zsh-hook precmd _zsh_autosuggest_start
|
add-zsh-hook precmd _zsh_autosuggest_start
|
||||||
|
|
Loading…
Reference in a new issue