From 46f854fc830aa4a36f65c9f43713f8e09c6b99d7 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 13 May 2016 11:19:56 +0200 Subject: [PATCH] Use if possible in :doautocmd prevents closing of folds on CursorHold autocommand when skip_empty sections is true --- plugin/airline.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 1c13380d..33dc6058 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -119,7 +119,11 @@ function! s:airline_theme(...) endfunction function! s:airline_refresh() - silent doautocmd User AirlineBeforeRefresh + let nomodeline='' + if v:version > 703 || v:version == 703 && has("patch438") + let nomodeline = '' + endif + exe printf("silent doautocmd %s User AirlineBeforeRefresh", nomodeline) call airline#load_theme() call airline#update_statusline() endfunction