barbar.nvim icon indicating copy to clipboard operation
barbar.nvim copied to clipboard

Final separator shifts layout

Open romgrk opened this issue 4 years ago • 2 comments

Screenshot from 2020-11-21 13-50-02

romgrk avatar Nov 21 '20 18:11 romgrk

I was investigating this just earlier, and found our code for inserting the final separator here. Why was the final separator added? Does it prevent a certain category of error when generating the tabline?

Essentially, could we just remove the separator?

Iron-E avatar Jul 01 '22 18:07 Iron-E

It's there to create a visual separation in cases where the inactive bg color is the same as the fill region bg color. I'd rather keep it if possible. We can probably add a + 1 somewhere in there to avoid shifting the layout in this specific case?

romgrk avatar Jul 01 '22 20:07 romgrk

For my future reference, the line causing the extra separator to be drawn is here.

Iron-E avatar Sep 29 '22 19:09 Iron-E

It's there to create a visual separation in cases where the inactive bg color is the same as the fill region bg color

Now that there is an icons.separator.right option, should we remove this?

  • If users want the functionality, they can use icons.inactive.separator.right
  • If using icons.separator.right, results like this appear cap (it makes it seem like there is a third buffer open that got cut off)

Iron-E avatar Apr 04 '23 19:04 Iron-E

  • If using icons.separator.right, results like this appear cap (it makes it seem like there is a third buffer open that got cut off)

In case anyone else stumbles over this problem, I just commented out the following lines in render.lua as a workaround. https://github.com/romgrk/barbar.nvim/blob/f0212c318e0f118ccb0e6166198895f78aa87efd/lua/barbar/ui/render.lua#L610-L617

mphe avatar May 29 '23 17:05 mphe

@mphe do you want to submit a PR?

Iron-E avatar May 31 '23 00:05 Iron-E

Sure, I'll look into it.

mphe avatar May 31 '23 16:05 mphe