Commit Graph

10 Commits (db290c518b600eedbb7af818ce19c5e7f106ceb7)

Author SHA1 Message Date
Eric Freese e405afab29 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

Also see http://www.zsh.org/mla/users/2018/msg00432.html

In async response handler:
- We only want to read data in case of POLLIN or POLLHUP. Not POLLNVAL
  or select error.
- We always want to remove the handler, so it doesn't get called in an
  infinite loop when error is nval or err.

There is an upstream bug that prevents ctrl-c from resetting the prompt
immediately after a suggestion has been fetched asynchronously. A patch
has been submitted, but a workaround for now is to add `command true`
after the exec.

See https://github.com/zsh-users/zsh-autosuggestions/issues/364
6 years ago
Eric Freese f0f1332e6b Add `after_sourcing` hook for tests
Is executed immediately after sourcing the plugin
7 years ago
Eric Freese a78ea16c50 Support fallback strategies by setting array in config 7 years ago
Eric Freese 62f5f14f2f default => history 7 years ago
Eric Freese 83129dd796 Make asynchronous suggestions disabled by default
While they are still experimental
8 years ago
Eric Freese ea505b01e5 Add a spec for unlisted widgets fetching a new suggestion 8 years ago
Eric Freese 2cd99e64b7 Add a test for modifying widget list vars after sourcing plugin 8 years ago
Eric Freese c70d685d15 Clean up widget list spec 8 years ago
Eric Freese 255359dbb8 Use `+=` to be a bit more true to the spec language 8 years ago
Eric Freese ed8056c5e8 Lots of async changes 8 years ago