Skip to content

Commit

Permalink
Ensure completion widgets always complete
Browse files Browse the repository at this point in the history
Fixes part of issue #282.
  • Loading branch information
marlonrichert committed Jun 8, 2021
1 parent 6745ee9 commit a1ee18e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions widget/.autocomplete.complete-word.completion-widget
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ builtin autoload -Uz .autocomplete.complete-word.post

local +h curcontext=${curcontext:-${WIDGET}:::}
local +h -a comppostfuncs=( .autocomplete.complete-word.post "$comppostfuncs[@]" )
if [[ $WIDGET == *-select ]] ||
if [[ $WIDGET == *menu-* ]] ||
( ( [[ "$KEYS" == "$key[Shift-Tab]" ]] ||
zstyle -t ":autocomplete:${(kL)key[(Re)$KEYS]}:" insert-unambiguous
) && [[
Expand All @@ -15,7 +15,9 @@ if [[ $WIDGET == *-select ]] ||
elif [[ -n $compstate[old_list] ]]; then
compstate[old_list]=keep
[[ "$KEYS" == "$key[Shift-Tab]" && $_lastcomp[tags] == *all-matches ]] &&
compstate[insert]=all
compstate[insert]=all
_main_complete -
else
_main_complete
fi
return 0 # Prevent beeping.

0 comments on commit a1ee18e

Please sign in to comment.