Merge pull request #125 from vigilancer/master

fix bug: '--tag-width 0' does not remove tags
This commit is contained in:
Jake Wharton
2016-01-29 19:30:59 -05:00
+10 -9
View File
@@ -333,15 +333,16 @@ while adb.poll() is None:
linebuf = '' linebuf = ''
# right-align tag title and allocate color if needed if args.tag_width > 0:
if tag != last_tag or args.always_tags: # right-align tag title and allocate color if needed
last_tag = tag if tag != last_tag or args.always_tags:
color = allocate_color(tag) last_tag = tag
tag = tag[-args.tag_width:].rjust(args.tag_width) color = allocate_color(tag)
linebuf += colorize(tag, fg=color) tag = tag[-args.tag_width:].rjust(args.tag_width)
else: linebuf += colorize(tag, fg=color)
linebuf += ' ' * args.tag_width else:
linebuf += ' ' linebuf += ' ' * args.tag_width
linebuf += ' '
# write out level colored edge # write out level colored edge
if level in TAGTYPES: if level in TAGTYPES: