From f9ccb57e76ec3fb2eafe4ebf66bf056e3e58afae Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 20 Nov 2018 15:55:11 +0100 Subject: [PATCH] Make terminal extension work with Neovim --- plugin/airline.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 418e8a1..ae3982f 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -128,8 +128,10 @@ function! s:airline_toggle() autocmd FocusGained * unlet! w:airline_lastmode | :call airline_refresh() endif - if exists("##TerminalOpen") - autocmd TerminalOpen * :call airline#load_theme() " reload current theme for Terminal, forces the terminal extension to be loaded + if exists("##TerminalOpen") || exists('##TermOpen') + let event = (has('nvim') ? 'TermOpen' : 'TerminalOpen') + " reload current theme for Terminal, forces the terminal extension to be loaded + exe 'autocmd' event '* :call airline#load_theme()' endif autocmd TabEnter * :unlet! w:airline_lastmode | let w:airline_active=1 autocmd BufWritePost */autoload/airline/themes/*.vim