-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabline showing wrongnames #2365
Comments
how to reproduce? |
I just noticed it works completely fine, but this only happens if I open startify.vim
|
is startify needed? Also, what do you mean with |
|
I also experience this, but cannot find a way to replicate it |
also experience this, very hard to reproduce |
this happens if call:NERDTreeToggle |
please provide exact reproduction steps. |
I see the same behaviour. When I use Vimwiki with different tabs, they seem to show the correct titles, but when I then do |
I don't know how to reproduce wrongnames of tabs of actual files, but the problem of wrongnames of nvim-builtin terminals is easy to reproduce. Create a terminal tab and switch to anothor tab, the label will change to be the same as current tab's, which is not the expected behavior. |
Perhaps some plugin's window is likely to make this issue Opening netrw window is the same:
|
Changing below fixes to show correct netrw tab name. Probably windows not listed in --- a/autoload/airline/extensions/tabline.vim
+++ b/autoload/airline/extensions/tabline.vim
@@ -215,7 +215,7 @@ if !exists(":def") || !airline#util#has_vim9_script()
let buflist = tabpagebuflist(a:n)
let winnr = tabpagewinnr(a:n)
let all_buffers = airline#extensions#tabline#buflist#list()
- let curbuf = filter(buflist, 'index(all_buffers, v:val) != -1')
+ let curbuf = buflist
if len(curbuf) == 0
call add(curbuf, tabpagebuflist()[0])
endif |
Or, changing as below: --- a/autoload/airline/extensions/tabline/buflist.vim
+++ b/autoload/airline/extensions/tabline/buflist.vim
@@ -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 So, |
#2169 is the same? |
Also, this looks a bug: --- a/autoload/airline/extensions/tabline.vim
+++ b/autoload/airline/extensions/tabline.vim
@@ -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 |
Anyway raised a pull request, though, went bad with the tests... Can anyone fix it? |
environment
if you are using terminal:
if you are using Neovim:
actual behavior
See Tabline, Both 2nd and 3rd have same name, but actually have different files in them if I navigate.
expected behavior
After :AirlineToggle . We can see the last tab had starify.vim instead vim-which-key.vim
So Airline was creating the problem.
The text was updated successfully, but these errors were encountered: