From a0298263b7fd55827839862ffd3a8d5b2a787a5c Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 25 Sep 2018 16:03:30 +0200 Subject: [PATCH] autocomd: do not re-evaluate modelines fixes #1804 --- autoload/airline.vim | 4 ++-- autoload/airline/extensions/tabline.vim | 2 +- autoload/airline/extensions/tabline/xtabline.vim | 10 +++++----- autoload/airline/util.vim | 5 +++++ plugin/airline.vim | 12 ++++-------- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 952a080..36475d1 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -68,7 +68,7 @@ function! airline#switch_theme(name) let w:airline_lastmode = '' call airline#load_theme() - silent doautocmd User AirlineAfterTheme + call airline#util#doautocmd('AirlineAfterTheme') " this is required to prevent clobbering the startup info message, i don't know why... call airline#check_mode(winnr()) @@ -203,7 +203,7 @@ function! airline#check_mode(winnr) if get(w:, 'airline_lastmode', '') != mode_string call airline#highlighter#highlight_modified_inactive(context.bufnr) call airline#highlighter#highlight(l:mode, context.bufnr) - silent doautocmd User AirlineModeChanged + call airline#util#doautocmd('AirlineModeChanged') let w:airline_lastmode = mode_string endif diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 1f9b0ff..c07dc83 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -57,7 +57,7 @@ function! s:update_tabline() \ || isdirectory(expand("")) return endif - doautocmd User BufMRUChange + call airline#util#doautocmd('BufMRUChange') " sometimes, the tabline is not correctly updated see #1580 " so force redraw here let &tabline = &tabline diff --git a/autoload/airline/extensions/tabline/xtabline.vim b/autoload/airline/extensions/tabline/xtabline.vim index 9ce3c56..e534fd4 100644 --- a/autoload/airline/extensions/tabline/xtabline.vim +++ b/autoload/airline/extensions/tabline/xtabline.vim @@ -100,11 +100,11 @@ function! airline#extensions#tabline#xtabline#maps() map cd2 XTablineCdDown2 map cd3 XTablineCdDown3 map cdh XTablineCdHome - nnoremap