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 = ''
|
linebuf = ''
|
||||||
|
|
||||||
# right-align tag title and allocate color if needed
|
if args.tag_width > 0:
|
||||||
if (tag != last_tag or args.always_tags) and args.tag_width > 0:
|
# 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:
|
||||||
|
|||||||
Reference in New Issue
Block a user