Refactor async mode to no longer use zpty

See technique used in `fast-syntax-highlighting`:
- ca2e18bbc9
- http://www.zsh.org/mla/users/2018/msg00424.html
This commit is contained in:
Eric Freese
2018-06-11 02:06:18 -06:00
parent 4e466f0e4e
commit 9cb0101512
8 changed files with 46 additions and 288 deletions

View File

@@ -93,7 +93,7 @@ _zsh_autosuggest_modify() {
# Fetch a new suggestion based on what's currently in the buffer
_zsh_autosuggest_fetch() {
if zpty -t "$ZSH_AUTOSUGGEST_ASYNC_PTY_NAME" &>/dev/null; then
if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then
_zsh_autosuggest_async_request "$BUFFER"
else
local suggestion