mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 14:54:54 +02:00
Cleanup code and comments
This commit is contained in:
parent
0bf23adbcc
commit
3b19dac9e7
@ -26,10 +26,6 @@ endfunction
|
|||||||
|
|
||||||
function! s:UpdateAllWindows()
|
function! s:UpdateAllWindows()
|
||||||
for winnr in range(1, winnr('$'))
|
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# ''
|
if getwinvar(winnr, 'window_id') is# ''
|
||||||
call setwinvar(winnr, 'window_id', s:pyeval('str(uuid.uuid4())'))
|
call setwinvar(winnr, 'window_id', s:pyeval('str(uuid.uuid4())'))
|
||||||
endif
|
endif
|
||||||
|
@ -36,8 +36,7 @@ class VimRenderer(Renderer):
|
|||||||
if current:
|
if current:
|
||||||
mode = vim_mode()
|
mode = vim_mode()
|
||||||
contents_override = None
|
contents_override = None
|
||||||
contents_cached = {segment['key']: segment['contents'] for segment in self.segments if segment['type'] == 'function'}
|
self.window_cache[window_id] = {segment['key']: segment['contents'] for segment in self.segments if segment['type'] == 'function'}
|
||||||
self.window_cache[window_id] = contents_cached
|
|
||||||
else:
|
else:
|
||||||
mode = 'nc'
|
mode = 'nc'
|
||||||
contents_override = self.window_cache.get(window_id)
|
contents_override = self.window_cache.get(window_id)
|
||||||
|
@ -34,7 +34,6 @@ class Renderer(object):
|
|||||||
provided they will fill the remaining space until the desired width is
|
provided they will fill the remaining space until the desired width is
|
||||||
reached.
|
reached.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
theme = self.get_theme()
|
theme = self.get_theme()
|
||||||
|
|
||||||
segments = theme.get_segments(mode, contents_override)
|
segments = theme.get_segments(mode, contents_override)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user