fix windows path separator parsing (#251).

This commit is contained in:
Bailey Ling 2013-09-13 19:14:56 +00:00
parent 11fe597152
commit 59e4ab49ce

View File

@ -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