diff --git a/autoload/airline/extensions/fugitiveline.vim b/autoload/airline/extensions/fugitiveline.vim index d9415e22..8cfd1391 100644 --- a/autoload/airline/extensions/fugitiveline.vim +++ b/autoload/airline/extensions/fugitiveline.vim @@ -34,6 +34,9 @@ function! airline#extensions#fugitiveline#bufname() let fmod = s:ModifierFlags() if empty(b:fugitive_name) + if empty(bufname('%')) + return &buftype ==# 'nofile' ? '[Scratch]' : '[No Name]' + endif return fnamemodify(bufname('%'), fmod) else return fnamemodify(b:fugitive_name, fmod). " [git]"