diff --git a/plugin/vim/powerline.vim b/plugin/vim/powerline.vim index 05cc6746..595c254e 100644 --- a/plugin/vim/powerline.vim +++ b/plugin/vim/powerline.vim @@ -26,10 +26,6 @@ endfunction function! s:UpdateAllWindows() for winnr in range(1, winnr('$')) - " getwinvar() returns empty string for undefined variables. Use - " has_key(getwinvar(winnr, ''), 'window_id') if you care about - " variable being really defined (currently with w:window_id=='' it - " will throw E706: variable type mismatch). if getwinvar(winnr, 'window_id') is# '' call setwinvar(winnr, 'window_id', s:pyeval('str(uuid.uuid4())')) endif diff --git a/powerline/ext/vim/renderer.py b/powerline/ext/vim/renderer.py index 2c7e32aa..44058379 100644 --- a/powerline/ext/vim/renderer.py +++ b/powerline/ext/vim/renderer.py @@ -36,8 +36,7 @@ class VimRenderer(Renderer): if current: mode = vim_mode() contents_override = None - contents_cached = {segment['key']: segment['contents'] for segment in self.segments if segment['type'] == 'function'} - self.window_cache[window_id] = contents_cached + self.window_cache[window_id] = {segment['key']: segment['contents'] for segment in self.segments if segment['type'] == 'function'} else: mode = 'nc' contents_override = self.window_cache.get(window_id) diff --git a/powerline/renderer.py b/powerline/renderer.py index 71da016a..1c86ade7 100644 --- a/powerline/renderer.py +++ b/powerline/renderer.py @@ -34,7 +34,6 @@ class Renderer(object): provided they will fill the remaining space until the desired width is reached. ''' - theme = self.get_theme() segments = theme.get_segments(mode, contents_override)