fix windows path separator parsing (#251).
This commit is contained in:
parent
11fe597152
commit
59e4ab49ce
@ -40,7 +40,7 @@ function! s:check_in_path()
|
|||||||
if !exists('b:airline_branch_path')
|
if !exists('b:airline_branch_path')
|
||||||
let root = get(b:, 'git_dir', get(b:, 'mercurial_dir', ''))
|
let root = get(b:, 'git_dir', get(b:, 'mercurial_dir', ''))
|
||||||
let bufferpath = resolve(fnamemodify(expand('%'), ':p:h'))
|
let bufferpath = resolve(fnamemodify(expand('%'), ':p:h'))
|
||||||
let root = fnamemodify(root, ':h')
|
let root = expand(fnamemodify(root, ':h'))
|
||||||
let b:airline_file_in_root = stridx(bufferpath, root) > -1
|
let b:airline_file_in_root = stridx(bufferpath, root) > -1
|
||||||
endif
|
endif
|
||||||
return b:airline_file_in_root
|
return b:airline_file_in_root
|
||||||
|
Loading…
Reference in New Issue
Block a user