From 7865dc8149e4778fa81acd3b8f5b7eb45597af85 Mon Sep 17 00:00:00 2001 From: Oz Elentok Date: Mon, 12 Jun 2017 22:00:25 +0300 Subject: [PATCH] Improve denite extension performance --- autoload/airline/extensions/denite.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/denite.vim b/autoload/airline/extensions/denite.vim index 672efbd..1d0ec7a 100644 --- a/autoload/airline/extensions/denite.vim +++ b/autoload/airline/extensions/denite.vim @@ -13,7 +13,10 @@ endif function! airline#extensions#denite#check_denite_mode(bufnr) let l:mode = split(denite#get_status_mode(), ' ') let l:mode = tolower(l:mode[1]) - call airline#highlighter#highlight([l:mode], a:bufnr) + if !exists('b:denite_mode_cache') || l:mode != b:denite_mode_cache + call airline#highlighter#highlight([l:mode], a:bufnr) + let b:denite_mode_cache = l:mode + endif return '' endfunction