bling/vim-bufferline

When only one buffer is open, do not highlight the buffer

BenBergman opened this issue · 4 comments

I recently started using vim-airline and vim-bufferline, and I use a solarized theme with patched powerline fonts. When I open a single file for editing, the current file is highlighted in the status bar, but since there aren't any separators that match the airline theme, the highlighted region is bounded by vertical lines. While this looks ok with multiple buffers open, it has been throwing me off when there is just a single file.

A potential solution might be to have an option to not show the bufferline if only one buffer is open/listed. I fiddled with the code a bit to try to add it, but found I was needing to refresh the buffer list an extra time, so clearly I was doing something wrong.

this could get confusing when you go from 1 to 2 buffers and back....with 1 buffer the "disabled" color will be the same as the "enabled" color with 2 buffers.

I suppose it might become confusing, but for me being used to the statusbar without bufferline, I find the enabled colour with only a single buffer confusing too. If this is an option (default to the current behaviour) I think it might be a bit more intuitive for some people (though understandably not all).

Perhaps my confusion is also partly due to the airline ">" symbols used everywhere except around the selected buffer. Perhaps an option to use the airline separators would make the visual transition to the enabled buffer a little easier. I know you can set the surround characters of bufferline, but it takes more than that to get the colour transition right too.

sure, i'll look into it.

Looks good, thanks. 👍