From 58bbc512f9cddbe6053e81c2d1b5ab0ae7d8fe0f Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 3 Feb 2019 10:43:23 +0100 Subject: [PATCH] tabline: Only define Terminal autocommand if vim supports it fixes the broken CI test which runs in a vim that does not come with terminal support --- autoload/airline/extensions/tabline/buffers.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index a59025ee..fb6043b3 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -37,7 +37,9 @@ function! airline#extensions#tabline#buffers#on() augroup airline_tabline_buffers autocmd! autocmd BufDelete * call airline#extensions#tabline#buflist#clean() - exe 'autocmd '. terminal_event. ' * call airline#extensions#tabline#buflist#clean()' + if exists("##".terminal_event) + exe 'autocmd '. terminal_event. ' * call airline#extensions#tabline#buflist#clean()' + endif autocmd User BufMRUChange call airline#extensions#tabline#buflist#clean() augroup END endfunction