diff --git a/pidcat.py b/pidcat.py index 570c53b..c95c25d 100755 --- a/pidcat.py +++ b/pidcat.py @@ -333,15 +333,16 @@ while adb.poll() is None: linebuf = '' - # right-align tag title and allocate color if needed - if tag != last_tag or args.always_tags: - last_tag = tag - color = allocate_color(tag) - tag = tag[-args.tag_width:].rjust(args.tag_width) - linebuf += colorize(tag, fg=color) - else: - linebuf += ' ' * args.tag_width - linebuf += ' ' + if args.tag_width > 0: + # right-align tag title and allocate color if needed + if tag != last_tag or args.always_tags: + last_tag = tag + color = allocate_color(tag) + tag = tag[-args.tag_width:].rjust(args.tag_width) + linebuf += colorize(tag, fg=color) + else: + linebuf += ' ' * args.tag_width + linebuf += ' ' # write out level colored edge if level in TAGTYPES: