From 9252c11d372562fb4cb91a93952617e3c562f7db Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 19 Jan 2023 20:48:30 +0100 Subject: [PATCH] tabnr_formatter: get correct name for tabpage --- autoload/airline/extensions/tabline.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index edd406cd..84501610 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -219,7 +219,10 @@ if !exists(":def") || !airline#util#has_vim9_script() if len(curbuf) == 0 call add(curbuf, tabpagebuflist(a:n)[0]) 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 return title @@ -435,7 +438,7 @@ else if len(curbuf) == 0 add(curbuf, tabpagebuflist(n)[0]) endif - return airline#extensions#tabline#get_buffer_name(n, curbuf) + return airline#extensions#tabline#get_buffer_name(curbuf[0], curbuf) endif return title enddef