highlight: skip processing the same hi group twice

Shouldn't happen, but just in case skip creating highlighting group,
if the same group with the same attributes has already been defined.
This commit is contained in:
Christian Brabandt
2017-06-26 23:06:46 +02:00
parent 583ae3d5f9
commit feee9bcf3c
3 changed files with 25 additions and 7 deletions

View File

@@ -118,13 +118,18 @@ function! airline#extensions#tabline#get()
if !exists('#airline#BufAdd#*')
autocmd airline BufAdd * call <sid>update_tabline()
endif
if s:ctrlspace
return airline#extensions#tabline#ctrlspace#get()
elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs
return airline#extensions#tabline#buffers#get()
else
return airline#extensions#tabline#tabs#get()
endif
try
let g:airline_theme_dict = {}
if s:ctrlspace
return airline#extensions#tabline#ctrlspace#get()
elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs
return airline#extensions#tabline#buffers#get()
else
return airline#extensions#tabline#tabs#get()
endif
finally
unlet g:airline_theme_dict
endtry
endfunction
function! airline#extensions#tabline#title(n)