Description of problem: "Less" changelog mentions following fix: "Don't output extraneous newlines, so copy & pasting lines from the output works better." In fact it is not possible to copy&paste lines longer than terminal-width without have ugly(wrong) carriage-returns in the buffer. It is quite a hassle to copy&paste long lines in multiple steps! Version-Release number of selected component (if applicable): less-394-5.el5 How reproducible: Steps to Reproduce: 1. Use X with attached mouse and open eg. xterm. 2. $ echo "a very long line *fill this text*" > /tmp/longline.txt 2. $ less /tmp/longline.txt 3. You should see the long line wrapped in multiple lines. Mark these lines by using the mouse and paste the text in some other xterm or application. Actual results: After pasting the text there are additional line breaks due to wrapping. These should not be there. Expected results: There should be no additional line breaks. Additional info: - This issue is only valid for RHEL5. There is no issue with RHEL4. - Workaround: call less with option "-r". - Additionally i see similar issues when using vim with the option "set ttyfast". So in fact i think the cause of the issue may be in other software (termcap/terminfo?). Updating "less" to a newer version fixes this issue though.
Hello, in less-406 a option --old-bot is added. With this options you can enable appending '\n'. So, I created a patch which does same thing. It means that if you run $ less --old-bot <file> then less will append '\n'. If you don't use this option, then less will not append '\n'. This behavior is same like in less-406. Zdenek
Created attachment 301976 [details] A patch which adds --old-bot options
Thanks. This patch is solving the issue. Will this patch incorperated into less.rpm releases for RHEL 3/4/5?
I don't know it now, it depends on the product management.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0413.html
Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: [Known issues] * The "less" command was updated and does not add the "carriage return" character when wrapping long lines anymore. This causes lines longer than the terminal width to be displayed incorrectly when browsing the file line per line. Using the command line option "--old-bot" with "less" will revert to the previous behavior and the long lines are displayed correctly.
Release note updated. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,3 +1 @@ -[Known issues] +The "less" command has been updated. Refer to RHBA-2009:0413. less no longer adds the "carriage return" character when wrapping long lines. Consequently, lines longer than the terminal width will be displayed incorrectly when browsing the file line per line. The command line option "--old-bot" forces less to behave as it did previously, with long text lines displayed correctly.- -* The "less" command was updated and does not add the "carriage return" character when wrapping long lines anymore. This causes lines longer than the terminal width to be displayed incorrectly when browsing the file line per line. Using the command line option "--old-bot" with "less" will revert to the previous behavior and the long lines are displayed correctly.
This fix seems to cause truncated output from less when using the "Scroll forward" feature (F). What we see is only last few characters of lines wider than the width of the terminal. It looks to be a regression that breaks a critical for us.