mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
Fix soft separator issue with vim divider segments
This commit is contained in:
parent
99ded1d0c6
commit
ffbdcc0f75
10
lib/core.py
10
lib/core.py
@ -204,7 +204,10 @@ class Segment:
|
|||||||
if segment.next.bg == segment.bg:
|
if segment.next.bg == segment.bg:
|
||||||
if segment.next.content and segment.separate:
|
if segment.next.content and segment.separate:
|
||||||
output += segment.padding
|
output += segment.padding
|
||||||
output += segment.separator['soft']
|
if segment.next.side == segment.side:
|
||||||
|
# Only draw the soft separator if this segment is on the same side
|
||||||
|
# No need to draw the soft separator if there's e.g. a vim divider in the next segment
|
||||||
|
output += segment.separator['soft']
|
||||||
# Don't draw a hard separator if the next segment is on
|
# Don't draw a hard separator if the next segment is on
|
||||||
# the opposite side, it screws up the coloring
|
# the opposite side, it screws up the coloring
|
||||||
elif segment.next.side == segment.side:
|
elif segment.next.side == segment.side:
|
||||||
@ -218,7 +221,10 @@ class Segment:
|
|||||||
if segment.prev.bg == segment.bg:
|
if segment.prev.bg == segment.bg:
|
||||||
if segment.prev.content and segment.separate:
|
if segment.prev.content and segment.separate:
|
||||||
pad_pre = True
|
pad_pre = True
|
||||||
output += segment.separator['soft']
|
if segment.prev.side == segment.side:
|
||||||
|
# Only draw the soft separator if this segment is on the same side
|
||||||
|
# No need to draw the soft separator if there's e.g. a vim divider in the previous segment
|
||||||
|
output += segment.separator['soft']
|
||||||
else:
|
else:
|
||||||
pad_pre = True
|
pad_pre = True
|
||||||
output += renderer.fg(segment.bg[0])
|
output += renderer.fg(segment.bg[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user