mirror of
https://github.com/imcarlost/pidcat-repl.git
synced 2026-08-08 23:17:43 -04:00
fix bug: '--tag-width 0' does not remove tags
This commit is contained in:
@@ -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) and args.tag_width > 0:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user