itchyny/lightline.vim

extra spaces from lightline-problem-12

elig0n opened this issue · 1 comments

Trying the example from lightline-problem-12 the normal status line shows up like this:

image

One problem that is noticeable here is that there is an extra space/s before filename component

Removing the modified component altogether gets it back to normal:

image

I then found out that if I remove the highlight string %#ModifiedColor# from the component the extra spaces would be gone.

Since the returned line is

return &modified ? '+' : &modifiable ? '' : '-'

it does not make sense that the spacing comes from it.

Setting the type of the component to raw will rid the spaces.

      \ 'component_type': {
      \   'modified': 'raw',
      \ },