Recursive main discovery fix

Main discovery always ended up starting on the base file when recursing.
To fix this we use the file stored in l:file instead of % (current file)
This commit is contained in:
Jesper Jensen 2016-11-28 15:56:28 +01:00 committed by Karl Yngve Lervåg
parent 33955aa83a
commit fc569e994b

View File

@ -637,7 +637,7 @@ function! s:get_main_recurse(...) " {{{1
"
" Gather candidate files
"
let l:path = expand('%:p:h')
let l:path = fnamemodify(l:file, ':p:h')
let l:dirs = l:path
while l:path != fnamemodify(l:path, ':h')
let l:path = fnamemodify(l:path, ':h')