mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-08 04:54:44 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user