Closed cseickel closed 3 years ago
Actually, that solution is not good because it disabled the tabline permanently. A better workaround is to return an empty string just before the cokeline:render function if there are no listed buffers.
c430ab62d7038adae282935558f5962d989c3715 should fix this. Could you test it?
That is working perfectly now, thanks!
If I don't set
hide_when_one_buffer = true
, and I open nvim without a file, I get errors about nil values and cokeline fails to load properly. I use Startify and normally open nvim without arguments and then launch a session from Startify (which is an unlisted buffer) so I hit that every time.Here is the error I get:
E5108: Error executing lua ...ack/packer/start/cokeline.nvim/lua/cokeline/cokeline.lua:83: attempt to perform arithmetic on field 'width' (a nil value)
I worked around the issue by adding this check to _G.cokeline() in init.lua:
I'm not sure if that's the ideal solution for everyone or not, but it works for me.