Use exit_fail hl group for last_status segment

Fixes #270
This commit is contained in:
ZyX 2013-02-27 01:06:11 +04:00
parent f3462768de
commit 16a5b7897a
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,9 @@ from powerline.theme import requires_segment_info
@requires_segment_info
def last_status(segment_info):
'''Return last exit code.'''
return str(segment_info.last_exit_code) if segment_info.last_exit_code else None
if not segment_info.last_exit_code:
return None
return [{'contents': str(segment_info.last_exit_code), 'highlight_group': 'exit_fail'}]
@requires_segment_info