Simplify vim renderer cache check

This commit is contained in:
Kim Silkebækken 2012-12-13 13:49:05 +01:00
parent 92324a6956
commit a272d907bc
1 changed files with 2 additions and 4 deletions

View File

@ -30,13 +30,11 @@ class VimRenderer(Renderer):
current = vim_getwinvar(winnr, 'current')
winwidth = vim_winwidth(winnr)
if current or not vim_getwinvar(winnr, 'powerline'):
contents_cached = {segment['key']: segment['contents'] for segment in self.segments if segment['type'] == 'function'}
vim_setwinvar(winnr, 'powerline', contents_cached)
if current:
mode = vim_mode()
contents_override = None
contents_cached = {segment['key']: segment['contents'] for segment in self.segments if segment['type'] == 'function'}
vim_setwinvar(winnr, 'powerline', contents_cached)
else:
mode = 'nc'
contents_cached = vim_getwinvar(winnr, 'powerline')