Shorten section z in small windows

This commit is contained in:
Christian Brabandt 2016-07-02 09:56:05 +02:00
parent 409e8b0cbd
commit e715bce77b
1 changed files with 5 additions and 1 deletions

View File

@ -131,7 +131,11 @@ function! airline#init#sections()
let g:airline_section_y = airline#section#create_right(['ffenc'])
endif
if !exists('g:airline_section_z')
let g:airline_section_z = airline#section#create(['windowswap', 'obsession', '%3p%%'.spc, 'linenr', 'maxlinenr', spc.':%3v'])
if winwidth(0) > 80
let g:airline_section_z = airline#section#create(['windowswap', 'obsession', '%3p%%'.spc, 'linenr', 'maxlinenr', spc.':%3v'])
else
let g:airline_section_z = airline#section#create(['%3p%%'.spc, 'linenr', ':%3v'])
endif
endif
if !exists('g:airline_section_error')
let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic', 'eclim'])