@@ -199,7 +199,7 @@ function! OmniSharp#stdio#Request(command, opts) abort
199
199
let sep = ' '
200
200
endif
201
201
202
- call s: Request (job, body, a: command , a: opts , sep)
202
+ call s: Request (job, body, a: command , a: opts , sep, bufnr )
203
203
204
204
if has_key (a: opts , ' ReplayOnLoad' )
205
205
let replay_opts = filter (copy (a: opts ), ' v:key !=# "ReplayOnLoad"' )
@@ -210,10 +210,10 @@ function! OmniSharp#stdio#Request(command, opts) abort
210
210
endfunction
211
211
212
212
function ! OmniSharp#stdio#RequestGlobal (job, command , opts) abort
213
- call s: Request (a: job , {}, a: command , a: opts )
213
+ call s: Request (a: job , {}, a: command , a: opts, ' ' , -1 )
214
214
endfunction
215
215
216
- function ! s: Request (job, body, command , opts, ... ) abort
216
+ function ! s: Request (job, body, command , opts, sep, bufnr ) abort
217
217
call OmniSharp#log#Log (a: job , ' Request: ' . a: command , 1 )
218
218
219
219
let a: body [' Command' ] = a: command
@@ -222,14 +222,14 @@ function! s:Request(job, body, command, opts, ...) abort
222
222
if has_key (a: opts , ' Parameters' )
223
223
call extend (a: body .Arguments , a: opts .Parameters, ' force' )
224
224
endif
225
- let sep = a: 0 ? a: 1 : ' '
226
- if sep !=# ' '
227
- let encodedBody = substitute (json_encode (a: body ), sep, ' \\r\\n' , ' g' )
225
+ if a: sep !=# ' '
226
+ let encodedBody = substitute (json_encode (a: body ), a: sep , ' \\r\\n' , ' g' )
228
227
else
229
228
let encodedBody = json_encode (a: body )
230
229
endif
231
230
232
231
let s: requests [s: nextseq ] = {
232
+ \ ' BufNum' : a: bufnr ,
233
233
\ ' Command' : a: command ,
234
234
\ ' Seq' : s: nextseq ,
235
235
\ ' StartTime' : reltime ()
0 commit comments