bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #36831] single character swallowed in output


From: Robert Flack
Subject: [bug #36831] single character swallowed in output
Date: Sat, 20 Jul 2013 00:03:43 +0000
User-agent: Mozilla/5.0 (X11; CrOS x86_64 4319.32.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.23 Safari/537.36

Follow-up Comment #2, bug #36831 (project grep):

Looking into this, it's definitely the same problem. When grep is in color
mode it outputs the control sequence

unmatched text ^[[01;31m^[[Kmatched text^[[m^[[K^M

If the matched text goes to the end of line, by the vt100 spec the cursor
remains at the end of line on the last character. This means the subsequent
^[[K (erase from cursor to end of line) erases the last character of the
matched text. This depends on the terminal, gnome-terminal and konsole treat
the erase to end of line differently after writing the last character on the
current line.

Does anyone know why the erase to end of line is necessary, given when in no
color mode grep just prints "unmatched text matched text^M" with no erase
codes? Removing these should fix the problem on all terminals.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36831>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]