Return empty string for empty sides
This commit is contained in:
parent
b7e7b1e4f7
commit
eb141428c6
|
@ -82,7 +82,10 @@ class Renderer(object):
|
||||||
'''
|
'''
|
||||||
rendered_highlighted = u''
|
rendered_highlighted = u''
|
||||||
segments_len = len(segments)
|
segments_len = len(segments)
|
||||||
mode = mode if mode in segments[0]['highlight'] else Colorscheme.DEFAULT_MODE_KEY
|
try:
|
||||||
|
mode = mode if mode in segments[0]['highlight'] else Colorscheme.DEFAULT_MODE_KEY
|
||||||
|
except IndexError:
|
||||||
|
return ''
|
||||||
|
|
||||||
for index, segment in enumerate(segments):
|
for index, segment in enumerate(segments):
|
||||||
prev_segment = segments[index - 1] if index > 0 else theme.EMPTY_SEGMENT
|
prev_segment = segments[index - 1] if index > 0 else theme.EMPTY_SEGMENT
|
||||||
|
|
Loading…
Reference in New Issue