@@ -270,13 +270,7 @@ function! s:handle_symbol(server, last_command_id, type, data) abort
270
270
271
271
let l: list = lsp#ui#vim#utils#symbols_to_loc_list (a: server , a: data )
272
272
273
- if has (' patch-8.2.2147' )
274
- call setqflist (l: list )
275
- call setqflist ([], ' a' , {' title' : a: type })
276
- else
277
- call setqflist ([])
278
- call setqflist (l: list )
279
- endif
273
+ call lsp#ui#vim#utils#setqflist (l: list , a: type )
280
274
281
275
if empty (l: list )
282
276
call lsp#utils#error (' No ' . a: type .' found' )
@@ -319,8 +313,7 @@ function! s:handle_location(ctx, server, type, data) abort "ctx = {counter, list
319
313
let l: level = count (l: parent [l: pos- 1 ].text, g: lsp_tree_incoming_prefix )
320
314
let a: ctx [' list' ] = extend (l: parent , map (a: ctx [' list' ], ' extend(v:val, {"text": repeat("' . g: lsp_tree_incoming_prefix . ' ", l:level+1) . v:val.text})' ), l: pos )
321
315
endif
322
- call setqflist ([])
323
- call setqflist (a: ctx [' list' ])
316
+ call lsp#ui#vim#utils#setqflist (a: ctx [' list' ], a: type )
324
317
echo ' Retrieved ' . a: type
325
318
botright copen
326
319
if get (a: ctx , ' add_tree' , v: false )
@@ -540,8 +533,7 @@ function! s:handle_call_hierarchy(ctx, server, type, data) abort
540
533
let l: level = count (l: parent [l: pos- 1 ].text, g: lsp_tree_incoming_prefix )
541
534
let a: ctx [' list' ] = extend (l: parent , map (a: ctx [' list' ], ' extend(v:val, {"text": repeat("' . g: lsp_tree_incoming_prefix . ' ", l:level+1) . v:val.text})' ), l: pos )
542
535
endif
543
- call setqflist ([])
544
- call setqflist (a: ctx [' list' ])
536
+ call lsp#ui#vim#utils#setqflist (a: ctx [' list' ], a: type )
545
537
echo ' Retrieved ' . a: type
546
538
botright copen
547
539
if get (a: ctx , ' add_tree' , v: false )
0 commit comments