Adding support for srcpath as string or list
This commit is contained in:
parent
4230773e7e
commit
5865e3b28e
@ -87,7 +87,7 @@ function! s:findFolderFromStackTrace(src,nameFromStackTrace,frameNumber)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" If no such tag was found, try to find it using the src path.
|
" If no such tag was found, try to find it using the src path.
|
||||||
for l:one_path in split(a:src, ':')
|
for l:one_path in vebugger#util#listify(a:src)
|
||||||
let l:path=l:one_path
|
let l:path=l:one_path
|
||||||
for l:dirname in split(a:nameFromStackTrace,'\.')
|
for l:dirname in split(a:nameFromStackTrace,'\.')
|
||||||
let l:nextPath=l:path.'/'.fnameescape(l:dirname)
|
let l:nextPath=l:path.'/'.fnameescape(l:dirname)
|
||||||
|
@ -115,3 +115,12 @@ function! vebugger#util#isPathAbsolute(path)
|
|||||||
return a:path[0]=~'\v^[/~$]' "Absolute paths in Linux start with ~(home),/(root dir) or $(environment variable)
|
return a:path[0]=~'\v^[/~$]' "Absolute paths in Linux start with ~(home),/(root dir) or $(environment variable)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! vebugger#util#listify(stringOrList)
|
||||||
|
if type(a:stringOrList) == type([])
|
||||||
|
return copy(a:stringOrList) " so it could safely be modified by map&filter
|
||||||
|
else
|
||||||
|
return [a:stringOrList]
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user