diff --git a/lib/core.py b/lib/core.py index a4f353da..26950054 100644 --- a/lib/core.py +++ b/lib/core.py @@ -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.