Respect user's set options when running original widget

Fixes GitHub #379
This commit is contained in:
Eric Freese
2018-12-09 10:14:19 -07:00
parent 11251d97ca
commit e937e89267
4 changed files with 30 additions and 4 deletions

View File

@@ -322,8 +322,6 @@ _zsh_autosuggest_clear() {
# Modify the buffer and get a new suggestion
_zsh_autosuggest_modify() {
emulate -L zsh
local -i retval
# Only available in zsh >= 5.4
@@ -340,6 +338,8 @@ _zsh_autosuggest_modify() {
_zsh_autosuggest_invoke_original_widget $@
retval=$?
emulate -L zsh
# Don't fetch a new suggestion if there's more input to be read immediately
if (( $PENDING > 0 )) || (( $KEYS_QUEUED_COUNT > 0 )); then
POSTDISPLAY="$orig_postdisplay"