Incorrect handling of "Erase in Line" at end of the line

Bug #1994966 reported by Yikai Zhao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvterm
New
Undecided
Unassigned

Bug Description

Steps to reproduce:

$ echo 0123456789 | grep --color=always 56789 > /tmp/grep.txt
$ ./bin/unterm -c 10 -l 10 /tmp/grep.txt

Actual output:

012345678

Expected output:

0123456789

---

Under the hood, grep produces "01234\33[01;31m\33[K56789\33[m\33[K". It seems that a "Erase in Line" at the end of the line would erase the last character in the line.

Revision history for this message
Yikai Zhao (blahgeek) wrote :
Revision history for this message
Yikai Zhao (blahgeek) wrote :

`export GREP_COLORS=ne` is a workaround for this issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.