mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-27 07:54:44 +02:00
tabnr_formatter: get correct name for tabpage
This commit is contained in:
parent
e4a57d0be4
commit
9252c11d37
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user