Closed alexanderjeurissen closed 6 years ago
@alexanderjeurissen thanks again for the detailed repro, this is great. I'll take a look whenever possible.
@alexanderjeurissen I pushed a fix for this, can you check if it's still an issue?
I can confirm that with the following minimal vimrc I'm no longer able to reproduce the bug I reported earlier:
set nocompatible " Be iMproved
"Note: install minpac if not present
if empty(glob('~/.config/nvim/pack/minpac/opt/minpac'))
silent !git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac
autocmd VimEnter * PlugInstall
endif
packadd minpac
call minpac#init()
call minpac#add('zefei/vim-wintabs')
call minpac#update()
if has_key(g:minpac#pluglist, 'vim-wintabs')
let g:wintabs_display = 'none'
endif
Nice work @zefei !!
Observed behavior:
There seems to be a bug in how
w:wintabs_buflist
is set. Ifg:wintabs_display
is eithertabline
orstatusline
it behaves as expected andw:wintabs_buflist
is set whenever vim is opened and a file is opened in a buffer.If however
g:wintabs_display
is set tonone
then vim-wintabs does not refresh the buflist it seems, and requires manualy invoking one of the wintabs navigation commands (WintabsNext / WintabsPrevious) to initialize thew:wintabs_buflist
dictionary, which also only contains the current buffer in that case. Strange enough invokingWintabsRefresh
does not work butWintabsNext
does init the variable.Expected behavior:
w:wintabs_buflist
is set and behaves consistently regardless of the setting ofg:wintabs_display
Reproduction steps:
Using the following minimal vimrc:
invoked using:
nvim -u ./minimal_vimrc.vim
:echo w:wintabs_buflist
=> expect error to be shown:e ~/.config/nvim/init.vim
:e ~/.zshrc
:WintabsNext