Closed jievince closed 10 months ago
Hmmm. The reason for the behavior was that I didn't want to deal with the complexity of dealing with \r
when I initially created this library. Will try to fix it in the near future. If you want to submit a fix, it'd be awesome too.
Hey @jievince https://github.com/jedib0t/go-pretty/releases/tag/v6.5.2 has the fix for this issue.
Hey @jievince https://github.com/jedib0t/go-pretty/releases/tag/v6.5.2 has the fix for this issue.
Hi @jedib0t , thanks for your work. I upgrade to v6.5.2 just now but the result seems still not right:
> return "abc\rde"
+-----+
| de" |
+-----+
| de" |
+-----+
It should return "dec" not "de".
I have commented in your pr: https://github.com/jedib0t/go-pretty/commit/9755509e525fe5f78ca64fbdbf85087e082387d3#r136463617
Hey @jievince please try the latest code on the main branch. Will cut a tag once you've verified.
Cut a tag anyway: https://github.com/jedib0t/go-pretty/releases/tag/v6.5.3
Hey @jievince please try the latest code on the main branch. Will cut a tag once you've verified.
Cut a tag anyway: https://github.com/jedib0t/go-pretty/releases/tag/v6.5.3
Hi @jedib0t, I tried v6.5.3 and it works right now! Thanks a lot!
Is your feature request related to a problem? Please describe.
I am using go-pretty library to render a result set for a CLI in linux environment. I found that go-pretty drops the
\r
but the expected behavior is to move the cursor to the head of a line.For example:
"abc\rde" is printed as "abcde" but the expected is "dec"
The related code in go-pretty:
Additional context
I tested the effect of the above string print on the linux machine, C++, golang and python, and it was all the "dec" I expected.