kdheepak / tabline.nvim

A "buffer and tab" tabline for neovim
MIT License
230 stars 17 forks source link

:tabnew offsets the whole tab names list. #33

Closed nesqi closed 2 years ago

nesqi commented 2 years ago

If you run :tabnew vim will create a new tab and insert it after the currently active tab. This breaks tablines tab names, as it doesn't update the list of names that is held in 'g:tabline_tab_data'

The result is that all tab names after the current tab are offset by one.

I think it should be possible to attach to TabNew and fix this when a new tab is created?

augroup tab_new_group
    autocmd!
    autocmd TabNew * lua require'<tabline>'.a_new_tab_was_added()
augroup end
nesqi commented 2 years ago

This is related to #21.