mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 08:26:07 +08:00
Merge pull request #2522 from KSR-Yasuda/bugfix/TabLine/WrongTabLabel
tabline: Fix tab label being named wrongly
This commit is contained in:
commit
98027a4680
|
@ -217,7 +217,7 @@ if !exists(":def") || !airline#util#has_vim9_script()
|
|||
let all_buffers = airline#extensions#tabline#buflist#list()
|
||||
let curbuf = filter(buflist, 'index(all_buffers, v:val) != -1')
|
||||
if len(curbuf) == 0
|
||||
call add(curbuf, tabpagebuflist()[0])
|
||||
call add(curbuf, tabpagebuflist(a:n)[0])
|
||||
endif
|
||||
return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf)
|
||||
endif
|
||||
|
@ -433,7 +433,7 @@ else
|
|||
var all_buffers = airline#extensions#tabline#buflist#list()
|
||||
var curbuf = filter(buflist, (_, v) => index(all_buffers, v) != -1)
|
||||
if len(curbuf) == 0
|
||||
add(curbuf, tabpagebuflist()[0])
|
||||
add(curbuf, tabpagebuflist(n)[0])
|
||||
endif
|
||||
return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf)
|
||||
endif
|
||||
|
|
|
@ -52,7 +52,7 @@ function! airline#extensions#tabline#buflist#list()
|
|||
" Basically branch 535 already does it, but since it relies on
|
||||
" BufAdd autocommand, I'd like to avoid this if possible.
|
||||
for nr in list
|
||||
if buflisted(nr)
|
||||
if bufloaded(nr)
|
||||
" Do not add to the bufferlist, if either
|
||||
" 1) bufnr is exclude_buffers list
|
||||
" 2) buffername matches one of exclude_paths patterns
|
||||
|
|
Loading…
Reference in New Issue
Block a user