Skip to content

Commit

Permalink
Fix 118: Clear suggestion before original widget to fix completions
Browse files Browse the repository at this point in the history
See PR #149
  • Loading branch information
ericfreese committed Apr 25, 2016
1 parent 964773a commit e87bc74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/widgets.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ _zsh_autosuggest_clear() {
_zsh_autosuggest_modify() {
local -i retval

# Clear suggestion while original widget runs
unset POSTDISPLAY

# Original widget modifies the buffer
_zsh_autosuggest_invoke_original_widget $@
retval=$?
Expand Down
3 changes: 3 additions & 0 deletions zsh-autosuggestions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ _zsh_autosuggest_clear() {
_zsh_autosuggest_modify() {
local -i retval

# Clear suggestion while original widget runs
unset POSTDISPLAY

# Original widget modifies the buffer
_zsh_autosuggest_invoke_original_widget $@
retval=$?
Expand Down

0 comments on commit e87bc74

Please sign in to comment.