parent
424f979136
commit
3703514ed7
|
@ -96,7 +96,9 @@ class Renderer(object):
|
|||
segment_hl = ''
|
||||
|
||||
if render_highlighted:
|
||||
if divider_type == 'hard':
|
||||
if divider_type == 'soft' and segment['divider_highlight_group'] is not None:
|
||||
divider_hl = self.hl(segment['divider_highlight'][mode]['fg'], segment['divider_highlight'][mode]['bg'], False)
|
||||
elif divider_type == 'hard':
|
||||
divider_hl = self.hl(segment['highlight'][mode]['bg'], compare_segment['highlight'][mode]['bg'], False)
|
||||
segment_hl = self.hl(**segment['highlight'][mode])
|
||||
|
||||
|
|
|
@ -35,11 +35,14 @@ class Segment(object):
|
|||
raise TypeError('Unknown segment type: {0}'.format(segment_type))
|
||||
contents, contents_func, key = get_segment_info(segment)
|
||||
highlight_group = segment.get('highlight_group', segment.get('name'))
|
||||
divider_highlight_group = segment.get('divider_highlight_group')
|
||||
return {
|
||||
'key': key,
|
||||
'type': segment_type,
|
||||
'highlight_group': highlight_group,
|
||||
'highlight': self.colorscheme.get_group_highlighting(highlight_group),
|
||||
'divider_highlight_group': divider_highlight_group,
|
||||
'divider_highlight': self.colorscheme.get_group_highlighting(divider_highlight_group) if divider_highlight_group else None,
|
||||
'before': segment.get('before', ''),
|
||||
'after': segment.get('after', ''),
|
||||
'contents_func': contents_func,
|
||||
|
|
Loading…
Reference in New Issue