diff --git a/autoload/airline/extensions/tabline/buflist.vim b/autoload/airline/extensions/tabline/buflist.vim index a944cb92..334784c8 100644 --- a/autoload/airline/extensions/tabline/buflist.vim +++ b/autoload/airline/extensions/tabline/buflist.vim @@ -14,7 +14,11 @@ endfunction " paths in excludes list function! s:ExcludePaths(nr, exclude_paths) - let bpath = fnamemodify(bufname(a:nr), ":p") + let bname = bufname(a:nr) + if empty(bname) + return 0 + endif + let bpath = fnamemodify(bname, ":p") for f in a:exclude_paths if bpath =~# f | return 1 | endif endfor diff --git a/doc/airline.txt b/doc/airline.txt index 9f5b1ca3..bd247e83 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -358,7 +358,7 @@ The "!" prevents terminal buffers to appear in the tabline. *airline#extensions#tabline#exclude_buffers* Buffer numbers to be excluded from showing in the tabline (similar to -|airline#ignore_bufadd_pat|. +|airline#ignore_bufadd_pat|). ============================================================================== EXTENSIONS *airline-extensions*