Skip to content

Commit 0386ac2

Browse files
committed
Enabling parsing w:quickfix_title in request finder
1 parent 8ff007b commit 0386ac2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

autoload/dispatch.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,12 @@ function! s:request(request) abort
745745
endwhile
746746
return {}
747747
elseif type(a:request) == type('') && !empty(a:request)
748-
return get(s:files, a:request, {})
748+
let id = matchstr(w:quickfix_title, '^:noautocmd cgetfile \zs.*\|^:Dispatch.*(\zs\w\+/\d\+\ze)$')
749+
if empty(id)
750+
return get(s:files, a:request, {})
751+
else
752+
return s:request(id)
753+
endif
749754
else
750755
return {}
751756
endif
@@ -886,8 +891,7 @@ function! s:cgetfile(request, all, copen) abort
886891
endfunction
887892

888893
function! dispatch#quickfix_init() abort
889-
let id = matchstr(w:quickfix_title, '^:noautocmd cgetfile \zs.*\|^:Dispatch.*(\zs\w\+/\d\+\ze)$')
890-
let request = s:request(id)
894+
let request = s:request(w:quickfix_title)
891895
if empty(request)
892896
return
893897
endif

0 commit comments

Comments
 (0)