mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Enable async mode by default in newer versions of zsh
Allow users to override the default by unsetting (or setting) the ZSH_AUTOSUGGEST_USE_ASYNC variable. See GitHub issue #498.
This commit is contained in:
parent
19e375bbc8
commit
6c634c1e35
4 changed files with 20 additions and 9 deletions
|
|
@ -854,5 +854,13 @@ _zsh_autosuggest_start() {
|
|||
# Mark for auto-loading the functions that we use
|
||||
autoload -Uz add-zsh-hook is-at-least
|
||||
|
||||
# Automatically enable asynchronous mode in newer versions of zsh. Disable for
|
||||
# older versions because there is a bug when using async mode where ^C does not
|
||||
# work immediately after fetching a suggestion.
|
||||
# See https://github.com/zsh-users/zsh-autosuggestions/issues/364
|
||||
if is-at-least 5.0.8; then
|
||||
typeset -g ZSH_AUTOSUGGEST_USE_ASYNC=
|
||||
fi
|
||||
|
||||
# Start the autosuggestion widgets on the next precmd
|
||||
add-zsh-hook precmd _zsh_autosuggest_start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue