Color is not reset on mr list if last branch is ellipsed
Description
If the branch for the final MR is too long to be listed, blue color is not ended at the end of the line and
Expected Behavior
The [0m
element should always close the color even if it is ellpised.
Actual Behavior
There is no [0m
element, leading the next line to retain its color
Possible Fix Error appears to be in https://github.com/profclems/glab/blob/606ba7dd2bb866c55af0eab1410707f18e0852a5/commands/mr.go#L23 - it seems that MaxColWidth is cutting off the end of color element.
Steps to Reproduce
- Clone https://gitlab.com/iggyvolz/repo-with-long-branch-name
- Run glab mr list
- The terminal is colored blue:
Showing mergeRequests 1 of 1 on iggyvolz/repo-with-long-branch-name
[0;32m#1[0m My Merge Request [0;36m(master) ← (this-is-a-really-long-branch-name-and-it-will-cau...
Context
Your Environment
- Version used:
glab version v1.9.1 (08/17/2020)
git version 2.28.0
Made with ❤ by Clement Sam <clementsam75@gmail.com> and contributors
- Operating System and version: Arch Linux (rolling)