lualine.nvim
lualine.nvim copied to clipboard
fix: edge case where buffer is added two times to buffers component
The total length check for the buffers component first checks if it has enough space to add a before buffer, then adds it and then checks it for buffers after the current one. If that second check fails the before buffer is added a second time to the buffer component, this time as an ellipsis which can lead to confusing behavior and unwanted visual artifacts. This commit fixes this problem.
Here is a screenshot to better illustrate the issue. Note the missing bar after the ellipsis:
Before:
After: