init whitespace extension to blank. fixes #226.

This commit is contained in:
Bailey Ling 2013-09-05 14:01:57 +00:00
parent a9b2fd2c41
commit ecd66184f6
3 changed files with 4 additions and 3 deletions

View File

@ -67,7 +67,7 @@ function! airline#init#bootstrap()
\ }) \ })
call airline#parts#define_raw('file', '%f%m') call airline#parts#define_raw('file', '%f%m')
call airline#parts#define_raw('ffenc', '%{printf("%s%s",&fenc,strlen(&ff)>0?"[".&ff."]":"")}') call airline#parts#define_raw('ffenc', '%{printf("%s%s",&fenc,strlen(&ff)>0?"[".&ff."]":"")}')
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic']) call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', 'whitespace'])
endfunction endfunction
function! airline#init#sections() function! airline#init#sections()

View File

@ -23,8 +23,8 @@ describe 'default'
it 'should only render warning section in active splits' it 'should only render warning section in active splits'
wincmd s wincmd s
Expect airline#statusline(1) =~ 'whitespace' Expect airline#statusline(1) =~ 'warning'
Expect airline#statusline(2) !~ 'whitespace' Expect airline#statusline(2) !~ 'warning'
wincmd c wincmd c
end end
end end

View File

@ -61,6 +61,7 @@ describe 'init'
Expect airline#parts#get('branch').raw == '' Expect airline#parts#get('branch').raw == ''
Expect airline#parts#get('tagbar').raw == '' Expect airline#parts#get('tagbar').raw == ''
Expect airline#parts#get('syntastic').raw == '' Expect airline#parts#get('syntastic').raw == ''
Expect airline#parts#get('whitespace').raw == ''
end end
end end