Merge pull request #996 from chrisbra/untracked_improvement
Small improvement for untracked feature
This commit is contained in:
commit
faaf58b2c5
|
@ -73,8 +73,10 @@ function! s:get_git_untracked(file)
|
||||||
if has_key(s:untracked_git, a:file)
|
if has_key(s:untracked_git, a:file)
|
||||||
let untracked = s:untracked_git[a:file]
|
let untracked = s:untracked_git[a:file]
|
||||||
else
|
else
|
||||||
let untracked = ((system('git status --porcelain -- ' . a:file)[0:1]) is# '??' ?
|
let output = system('git status --porcelain -- '. a:file)
|
||||||
\ get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) : '')
|
if output[0:1] is# '??' && output[3:-2] is? a:file
|
||||||
|
let untracked = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists)
|
||||||
|
endif
|
||||||
let s:untracked_git[a:file] = untracked
|
let s:untracked_git[a:file] = untracked
|
||||||
endif
|
endif
|
||||||
return untracked
|
return untracked
|
||||||
|
|
Loading…
Reference in New Issue