mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
theme: do not show not-found warning
Only show the "airline theme not found" warning message, when the user actually used `:AirlineTheme foobar`, not when called by an autocommand that tries to switch themes when the Vim colorscheme changed. fixes #1824
This commit is contained in:
@@ -151,7 +151,10 @@ endfunction
|
||||
|
||||
function! s:airline_theme(...)
|
||||
if a:0
|
||||
call airline#switch_theme(a:1)
|
||||
try
|
||||
call airline#switch_theme(a:1)
|
||||
catch " discard error
|
||||
endtry
|
||||
else
|
||||
echo g:airline_theme
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user