mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 20:24:27 +08:00
tabnr_formatter: get correct name for tabpage
This commit is contained in:
@@ -219,7 +219,10 @@ if !exists(":def") || !airline#util#has_vim9_script()
|
|||||||
if len(curbuf) == 0
|
if len(curbuf) == 0
|
||||||
call add(curbuf, tabpagebuflist(a:n)[0])
|
call add(curbuf, tabpagebuflist(a:n)[0])
|
||||||
endif
|
endif
|
||||||
return airline#extensions#tabline#get_buffer_name(a:n, curbuf)
|
" a:n: -> buffer number
|
||||||
|
" curbuf: list of buffers in current tabpage
|
||||||
|
" we need the buffername in current tab page.
|
||||||
|
return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return title
|
return title
|
||||||
@@ -435,7 +438,7 @@ else
|
|||||||
if len(curbuf) == 0
|
if len(curbuf) == 0
|
||||||
add(curbuf, tabpagebuflist(n)[0])
|
add(curbuf, tabpagebuflist(n)[0])
|
||||||
endif
|
endif
|
||||||
return airline#extensions#tabline#get_buffer_name(n, curbuf)
|
return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf)
|
||||||
endif
|
endif
|
||||||
return title
|
return title
|
||||||
enddef
|
enddef
|
||||||
|
|||||||
Reference in New Issue
Block a user