Skip to content

Commit

Permalink
Make inserting a completion reset the completion context to default
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Apr 4, 2024
1 parent a8fdd21 commit 12e1a7f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/zsh
zmodload -F zsh/terminfo p:terminfo

local +h curcontext=${curcontext:-${WIDGET}:::}
local context=${curcontext:-${WIDGET}:::}
unset curcontext
local +h curcontext=$context

local +h -a comppostfuncs=( .autocomplete__complete-word__post "$comppostfuncs[@]" )

if [[ -z $compstate[old_list] && $curcontext == history-incremental-search* ]]; then
Expand Down

0 comments on commit 12e1a7f

Please sign in to comment.