Fixed l:matches (list [], not dict {}), and uncommented empty asyncomplete#complete() calls

This commit is contained in:
Trey Blancher 2023-04-30 16:27:11 -04:00
parent 54eee2c62b
commit ba0f4b9552
1 changed files with 3 additions and 3 deletions

View File

@ -95,12 +95,12 @@ endfunction
function! asyncomplete#sources#muttgoobook#completor(opt, ctx) abort
"echomsg 'Calling completor...'
let l:matches = {}
let l:matches = []
"let l:cur = getpos('.')
if !s:is_address_field(s:get_section())
"echomsg 'Not in an address field. Exiting...'
"call setpos(l:cur)
"call asyncomplete#complete(a:opt['name'], a:ctx, l:startcol, l:matches, 1)
call asyncomplete#complete(a:opt['name'], a:ctx, l:startcol, l:matches, 1)
return
endif
@ -135,7 +135,7 @@ function! asyncomplete#sources#muttgoobook#completor(opt, ctx) abort
"echomsg "a:ctx: " . a:ctx
"echomsg "l:startcol: " . l:startcol
"echomsg "l:matches: " . l:matches
"call asyncomplete#complete(a:opt['name'], a:ctx, l:startcol, l:matches, 1)
call asyncomplete#complete(a:opt['name'], a:ctx, l:startcol, l:matches, 1)
return
endif