@@ -8,10 +8,11 @@ function! OmniSharp#actions#complete#Get(partial, opts) abort
8
8
if ! OmniSharp#IsServerRunning ()
9
9
return []
10
10
endif
11
+ let opts = type (a: opts ) == type ({}) ? a: opts : { ' Callback' : a: opts }
11
12
if g: OmniSharp_server_stdio
12
13
let s: complete_pending = 1
13
- call s: StdioGetCompletions (a: partial , a: opts , function (' s:CBGet' , [a: opts ]))
14
- if ! has_key (a: opts , ' Callback' )
14
+ call s: StdioGetCompletions (a: partial , opts, function (' s:CBGet' , [opts]))
15
+ if ! has_key (opts, ' Callback' )
15
16
" No callback has been passed in, so this function should return
16
17
" synchronously, so it can be used as an omnifunc
17
18
let starttime = reltime ()
@@ -26,7 +27,7 @@ function! OmniSharp#actions#complete#Get(partial, opts) abort
26
27
let completions = OmniSharp#py#Eval (
27
28
\ printf (' getCompletions(%s)' , string (a: partial )))
28
29
if OmniSharp#py#CheckForError () | let completions = [] | endif
29
- return s: CBGet (a: opts , completions)
30
+ return s: CBGet (opts, completions)
30
31
endif
31
32
endfunction
32
33
0 commit comments