From 313a6fcad23bead6ea104624488fc1474cb49a52 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 27 Jun 2017 18:28:28 +0200 Subject: [PATCH] tabline: prevent flicker on Windows calling settabvar() while evaluating the 'tabline' setting apparently causes flicker on Windows. Fall back to using `:let t:var` to store the content in the current tabpage. This is not as good as using `settabvar()` since we cannot store the title for other tabs, but at least it should prevent the flicker and at the same time at least cache the title for the current tabpage. --- autoload/airline/extensions/tabline.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index a97cbe1..91c19d3 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -147,7 +147,12 @@ function! airline#extensions#tabline#title(n) endif if exists("*settabvar") && !empty(title) - call settabvar(a:n, 'title', title) + " don't use settabvar, it causes a refresh, + " which in turn causes flicker on windows + "call settabvar(a:n, 'title', title) + if tabpagenr() == a:n + let t:title = title + endif endif return title endfunction