mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
Ignore empty segments that aren't filler segments
This commit is contained in:
parent
2ea555b2dd
commit
cbf8d16ed8
@ -15,8 +15,11 @@ class Powerline:
|
||||
|
||||
def __init__(self, segments):
|
||||
'''Create a new Powerline.
|
||||
|
||||
Segments that have empty contents and aren't filler segments are
|
||||
dropped from the segment array.
|
||||
'''
|
||||
self.segments = segments
|
||||
self.segments = [segment for segment in segments if segment.contents or segment.filler]
|
||||
|
||||
def render(self, renderer, width=None):
|
||||
'''Render all the segments with the specified renderer.
|
||||
|
Loading…
x
Reference in New Issue
Block a user