Commit Graph

32 Commits (a78ea16c507f00e07c3f81349b852a90aeb53366)

Author SHA1 Message Date
Eric Freese a78ea16c50 Support fallback strategies by setting array in config 7 years ago
Eric Freese 4540304fa0 Reset opts in some functions affected by GLOB_SUBST
Should fix GitHub #334
7 years ago
Eric Freese 393f7b8bb9 Fix vi-mode partial-accept
Issue #188. PR #324.

Thanks to @toadjaune and @IngoHeimbach.
7 years ago
Eric Freese 42f5a06f7f Need to reset the POSTDISPLAY if exiting early
Specific case where this matters is following:

Be in vi insert mode with some text in the buffer and the cursor at the
end of the buffer. Press `esc` to trigger `vi-cmd-mode widget`, then
before the cursor moves (KEYTIMEOUT), press `h` to trigger
`vi-backward-char` widget. When `vi-cmd-mode` original widget exits,
KEYS_QUEUED_COUNT will be non-zero and the suggestion will be lost.
7 years ago
Kaleb Elwert 940e10a691 Fix conditionals to use [[ and (( rather than [
This fixes a small issue in src/widgets.zsh which makes it so if you
alias [ to g[ (as is done in prezto if the gnu-utility module is loaded)
autosuggestions would fail.

The documentation for GNU test mentions that -o and -a should be avoided
if possible because it's not very clear. Also, with zsh and [[ -o
actually tests if an option is set, which makes this option even more
confusing.
8 years ago
Eric Freese 9f1f322979 Update comment about KEYS_QUEUED_COUNT support
Now that patch has released
8 years ago
Eric Freese a2f0ffb122 Enabling suggestions should not fetch a suggestion if buffer is empty 9 years ago
Eric Freese 7d4a1d9a4a Add enable/disable/toggle widgets to disable suggestion functionality
[GitHub #219]

Intended to be helpful for folks using bracketed-paste-magic and other
widgets that use `zle -U`.
9 years ago
Eric Freese e1959d0f61 Put in a general fix for #219 - Handling input from `zle -U`
Depends on patch to ZSH from workers/40702:

  http://www.zsh.org/mla/workers/2017/msg00414.html
9 years ago
Eric Freese 23ef16c297 Do not show suggestions if the buffer is empty 9 years ago
Eric Freese ed8056c5e8 Lots of async changes 9 years ago
Eric Freese 2c465a932a Rename async pty name config var 9 years ago
Eric Freese e3eb286ea2 Lots of little async cleanups 9 years ago
Eric Freese 54e1eee924 Optimize case where manually typing in a suggestion 9 years ago
Eric Freese ab2742537f Quote the suggestion to support sh_split_word option 9 years ago
Eric Freese ab8f295225 First pass at async functionality 9 years ago
Eric Freese b377c39d0e Only fetch a new suggestion if buffer has changed 9 years ago
Eric Freese a44aa59321 Remove unnecessary reset of POSTDISPLAy 9 years ago
Lorenzo Bolla 2450c95d8a Rename and document new config var 9 years ago
Lorenzo Bolla 7b81eb79b8 Disable autosuggest if buffer is too large
Make buffer max size configurable, defaulted to infinity
9 years ago
Eric Freese e87bc74654 Fix 118: Clear suggestion before original widget to fix completions
See PR #149
9 years ago
Eric Freese 1d4f7e157e Keep track of return value from original widget (#135) 9 years ago
Eric Freese 15c5db898f Fix #137 9 years ago
Eric Freese a314a01a6a Fix various bugs found while testing 9 years ago
Eric Freese 8c3fdea75d Call original accept-line widget when executing suggestion 10 years ago
Kordan Ou aa597eea6d Add an autosuggest widget: autosuggest-execute. 10 years ago
Eric Freese 1b98af5b33 Fix suggestions when `sh_split_words` option is enabled 10 years ago
Eric Freese 5e419da326 Remove list of modify widgets and make 'modify' the default behavior. 10 years ago
Eric Freese ebcfc46b72 Comment formatting 10 years ago
Eric Freese 51b39e210e Bound widgets now handle arguments correctly 10 years ago
Eric Freese f154d25fb3 Fix typo when setting up `autosuggest-clear` widget. 10 years ago
Eric Freese 775dd20706 Rewrite 10 years ago