From bd468dacfe874fd669ec69522b550d3e1371cf56 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 22 Nov 2018 08:31:14 +0100 Subject: [PATCH] Revert TermOpen autocommand for Neovim closes #1828 --- plugin/airline.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index ae3982f5..c91ff206 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -128,10 +128,10 @@ function! s:airline_toggle() autocmd FocusGained * unlet! w:airline_lastmode | :call airline_refresh() endif - 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()' + if exists("##TerminalOpen") + " Using the same function with the TermOpen autocommand + " breaks for Neovim see #1828, looks like a neovim bug. + autocmd TerminalOpen * :call airline#load_theme() " reload current theme for Terminal, forces the terminal extension to be loaded endif autocmd TabEnter * :unlet! w:airline_lastmode | let w:airline_active=1 autocmd BufWritePost */autoload/airline/themes/*.vim