Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accents may cause status line exceed width #696

Closed
jszakmeister opened this issue Feb 6, 2015 · 9 comments
Closed

Accents may cause status line exceed width #696

jszakmeister opened this issue Feb 6, 2015 · 9 comments

Comments

@jszakmeister
Copy link

I have the following in my theme:

    let g:airline#themes#szakdark#palette.accents = {
        \ 'red': ['#ff0000' , '', 160, ''],
        \ 'boldwhite': ['#ffffff' , '', 15, '', 'bold'],
        \ 'brightorange': ['#ffaf00' , '', 214, ''],
        \ }
    call airline#highlighter#add_accent('red')
    call airline#highlighter#add_accent('boldwhite')
    call airline#highlighter#add_accent('brightorange')

If I do:

    call airline#parts#define_accent('syntastic', 'brightorange')

Then I end up with the status line wrapping around on a really large file name:

screen shot 2015-02-06 at 5 07 07 am

If it helps, I have changed the layout for the parts a bit:

        let g:airline_section_a = airline#section#create_left(['mode'])
        let g:airline_section_b = airline#section#create_left(['branch', 'readonly', 'file'])
        let g:airline_section_c = airline#section#create(['syntastic'])
        let g:airline_section_gutter = airline#section#create(['%='])
        let g:airline_section_x = airline#section#create_right(['tagbar', 'filetype'])
        let g:airline_section_y = airline#section#create_right(['%3p%%'])
        let g:airline_section_z = airline#section#create(['linenr', ':%2c'])
        let g:airline_section_warning = airline#section#create_right(['paste', 'whitespace'])

But I think it should work, despite the change in layout.

I think part of the issue is the extra triangle after the filename. If I run the SyntasticCheck on the buffer, then I get:

screen shot 2015-02-06 at 5 10 56 am

Let me know if there's anything I can do to help debug the issue.

@jszakmeister
Copy link
Author

The terminal version also seems confused by this:

screen shot 2015-02-06 at 5 42 15 am

You can see filetype is repeated, but only partially. If I don't define the accents, then it renders fine.

@bling
Copy link
Member

bling commented Feb 19, 2015

does it make any difference if you add <% in there somewhere? typically this is included in any statusline config, but since you've overwritten all the default configuration and omitted this, maybe vim is getting confused on what to do with a really long statusline...

@jszakmeister
Copy link
Author

It doesn't appear to help. What's the proper way to change the default layout?

This is with:

let g:airline_section_c = '%<' . airline#section#create(['syntastic'])

screen shot 2015-02-19 at 6 10 33 am

And the terminal still seems confused too. :-(

@chrisbra
Copy link
Member

Is there an easy way to reproduce this issue?

@jszakmeister
Copy link
Author

I haven't tried again in quite a while, but the config I posted earlier is what I used, and you had to open a file with a really long name so that it would exceed the available space. I remember trying to pare things down to something smaller, but I wasn't successful in doing that.

@chrisbra
Copy link
Member

okay, i thought,this might have been related to your custom theme, that you mentioned in the beginning

@chrisbra
Copy link
Member

iss696
Seems to work for me. This is current head, with a 7.4.488 stock debian default vim and putty.
Perhaps we have an issue truncating the filename.

@chrisbra
Copy link
Member

I am goind to close this for now. If this happens again, please re-open.

@jszakmeister
Copy link
Author

okay, i thought,this might have been related to your custom theme, that you mentioned in the beginning

Actually, I believe that is true--I forgot about that part of the equation. I was trying to color the syntastic field differently, and that's when things fell apart. But, I was also overriding the default airline config, because I didn't like the layout--I wanted it to be closer to what I had configured for powerline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants