Skip to content

Commit 5624f7b

Browse files
committed
Fix problem where alternative async completion modes would return 0 results
1 parent 710752f commit 5624f7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Functions/Init/.autocomplete__async

+6-1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ ${0}:precmd() {
204204
return 0
205205
}
206206

207+
# function -T
207208
.autocomplete:async:start() {
208209
local fd=
209210
sysopen -r -o cloexec -u fd <(
@@ -216,6 +217,7 @@ ${0}:precmd() {
216217
command true
217218
}
218219

220+
# function -T
219221
.autocomplete:async:start:inner() {
220222
{
221223
typeset -F SECONDS=0
@@ -271,6 +273,7 @@ ${0}:precmd() {
271273
}
272274
}
273275

276+
# function -T
274277
.autocomplete:async:pty() {
275278
# Make sure this shell dies after it times out.
276279
local -F seconds=
@@ -290,6 +293,7 @@ ${0}:precmd() {
290293
:
291294
}
292295

296+
# function -T
293297
.autocomplete:async:pty:zle-widget() {
294298
local -a _autocomplete__comp_mesg=()
295299
local -i _autocomplete__list_lines=0
@@ -312,6 +316,7 @@ ${0}:precmd() {
312316
}
313317
} 2>>| $_autocomplete__log
314318

319+
# function -T
315320
.autocomplete:async:pty:completion-widget() {
316321
{
317322
if ! .autocomplete:async:sufficient-input; then
@@ -320,7 +325,7 @@ ${0}:precmd() {
320325
{
321326
unfunction compadd 2> /dev/null
322327
unset 'compstate[vared]'
323-
autocomplete:_main_complete:new
328+
.autocomplete:async:list-choices:main-complete
324329
} always {
325330
_autocomplete__list_lines=$compstate[list_lines]
326331
}

0 commit comments

Comments
 (0)