mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-21 21:14:47 +02:00
possible fix for exit code (#79).
This commit is contained in:
parent
41414a3a84
commit
4b33adee42
@ -48,19 +48,18 @@ endfunction
|
|||||||
|
|
||||||
function! airline#switch_matching_theme()
|
function! airline#switch_matching_theme()
|
||||||
if exists('g:colors_name')
|
if exists('g:colors_name')
|
||||||
let v:errmsg = ''
|
try
|
||||||
silent! let palette = g:airline#themes#{g:colors_name}#palette
|
let palette = g:airline#themes#{g:colors_name}#palette
|
||||||
if empty(v:errmsg)
|
|
||||||
call airline#switch_theme(g:colors_name)
|
call airline#switch_theme(g:colors_name)
|
||||||
return 1
|
return 1
|
||||||
else
|
catch
|
||||||
for map in items(g:airline_theme_map)
|
for map in items(g:airline_theme_map)
|
||||||
if match(g:colors_name, map[0]) > -1
|
if match(g:colors_name, map[0]) > -1
|
||||||
call airline#switch_theme(map[1])
|
call airline#switch_theme(map[1])
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endtry
|
||||||
endif
|
endif
|
||||||
return 0
|
return 0
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user