parent
123bea5850
commit
aed21575b8
@ -374,17 +374,20 @@ endfunction
|
|||||||
function! foreplay#quickfix_for(stacktrace) abort
|
function! foreplay#quickfix_for(stacktrace) abort
|
||||||
let qflist = []
|
let qflist = []
|
||||||
for line in a:stacktrace
|
for line in a:stacktrace
|
||||||
let match = matchlist(line, '\(.*\)(\(.*\):\(\d\+\))')
|
|
||||||
let entry = {'text': line}
|
let entry = {'text': line}
|
||||||
let [_, class, file, lnum; __] = match
|
let match = matchlist(line, '\(.*\)(\(.*\))')
|
||||||
let entry.lnum = lnum
|
if !empty(match)
|
||||||
let truncated = substitute(class, '\.[A-Za-z0-9_]\+\%($.*\)$', '', '')
|
let [_, class, file; __] = match
|
||||||
if file == 'NO_SOURCE_FILE'
|
if file =~# '^NO_SOURCE_FILE:' || file !~# ':'
|
||||||
let entry.resource = ''
|
let entry.resource = ''
|
||||||
else
|
let entry.lnum = 0
|
||||||
let entry.resource = tr(truncated, '.', '/').'/'.file
|
else
|
||||||
|
let truncated = substitute(class, '\.[A-Za-z0-9_]\+\%($.*\)$', '', '')
|
||||||
|
let entry.resource = tr(truncated, '.', '/').'/'.split(file, ':')[0]
|
||||||
|
let entry.lnum = split(file, ':')[-1]
|
||||||
|
endif
|
||||||
|
let qflist += [entry]
|
||||||
endif
|
endif
|
||||||
let qflist += [entry]
|
|
||||||
endfor
|
endfor
|
||||||
let paths = map(copy(qflist), 'foreplay#findresource(v:val.resource)')
|
let paths = map(copy(qflist), 'foreplay#findresource(v:val.resource)')
|
||||||
let i = 0
|
let i = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user