Refactor async mode to no longer use zpty

See technique used in `fast-syntax-highlighting`:
- https://github.com/zdharma/fast-syntax-highlighting/commit/ca2e18bbc9e27b9264206c257d2ab68838162c70
- http://www.zsh.org/mla/users/2018/msg00424.html
This commit is contained in:
Eric Freese
2018-06-11 02:12:47 -06:00
parent 4e466f0e4e
commit 9cb0101512
8 changed files with 46 additions and 288 deletions
+1 -1
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