mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 17:57:36 +08:00
buflist: do not consider empty buffers to be excluded
currently, empty buffer names were still considered to match against the exclude_path setting. That does not make sense, so skip the check for empty bufnames.
This commit is contained in:
parent
0a1f4cc910
commit
916d023c35
|
@ -14,7 +14,11 @@ endfunction
|
||||||
|
|
||||||
" paths in excludes list
|
" paths in excludes list
|
||||||
function! s:ExcludePaths(nr, exclude_paths)
|
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
|
for f in a:exclude_paths
|
||||||
if bpath =~# f | return 1 | endif
|
if bpath =~# f | return 1 | endif
|
||||||
endfor
|
endfor
|
||||||
|
|
|
@ -358,7 +358,7 @@ The "!" prevents terminal buffers to appear in the tabline.
|
||||||
|
|
||||||
*airline#extensions#tabline#exclude_buffers*
|
*airline#extensions#tabline#exclude_buffers*
|
||||||
Buffer numbers to be excluded from showing in the tabline (similar to
|
Buffer numbers to be excluded from showing in the tabline (similar to
|
||||||
|airline#ignore_bufadd_pat|.
|
|airline#ignore_bufadd_pat|).
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
EXTENSIONS *airline-extensions*
|
EXTENSIONS *airline-extensions*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user