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.
This commit is contained in:
parent
825aec9e4d
commit
313a6fcad2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user