Version: (using KDE KDE 3.1.4) Installed from: Gentoo Packages OS: Linux When copying a line of text from one konsole that wraps (it is longer than my width which is 80 chars) and pasting into another konsole, in some cases there is an extra newline inserted- so that the single long line becomes 2 lines. When running vim in both konsoles, this always happens when my TERM is set to linux. It doesn't happen if my TERM is set to vt100 or xterm. When copying the output of "more" or "less" in one konsole, and pasting into vim in the second konsole, this always happens. This doesn't happen with gnome-terminal. I apologize if this isn't specifically a konsole problem. Thanks!
For the less part, konsole doesn't know it's a single long line because less does the breaking. I don't know Konsole code internally, but it seems to me that it knows internally which lines were wrapped by itself and what got line-wrapped by a LF. In other words, less sends a line-break, so Konsole isn't wrong in giving you two distinct lines.
Bug seems to be a duplicate of Bug 64295 or vice versa.
*** Bug 64295 has been marked as a duplicate of this bug. ***
Maybe that less sends a line-break and that Konsole isn't wrong to paste that line-break. But the same problem occurs with many other terminal applications (including vim), and if I run those in xterm, pasting wrapped lines works perfectly well. I'm not absolutely sure, but I believe to remember that even Konsole could do that better in previous versions.
Updating the bug report, as requested. This is still a problem in KDE 2.2.2. Thanks.
Argh I mean KDE 3.2.2 of course. Thanks.
This also works for me. Perhaps some screenshots would help clarify the bug. A 100% reproducable case would be helpful as well.
>When running vim in both konsoles, this always happens when my TERM is set to >linux. It doesn't happen if my TERM is set to vt100 or xterm. I just tried this again and it still occurs for me. I'm not sure I understand- you're saying you don't observe this behavior? 1. Open 2 konsoles, set TERM=linux in both and run vim in both. 2. From the vim session in konsole #1 copy and paste a wrapped line into the vim session in konsole #2. There will be an extra newline inserted in konsole #2. I'm not sure what this means, other than the TERM setting is possibly involved. >When copying the output of "more" or "less" in one konsole, and pasting into >vim in the second konsole, this always happens. Again I'm not sure I understand- you don't observe this? As other people have pointed out, "more" and "less" are sending a line-break. 1. Open 2 konsoles. In konsole #1 "less" a file with a wrapped line and in konsole #2 run vim. 2. Copy and paste a wrapped line from konsole #1 into the vim session in konsole #2. There will be a newline inserted. Perhaps this behavior of konsole is technically correct- but gnome-terminal is smart enough to NOT insert a newline. This is something people do all the time, copy and paste from "more" or "less" into a vim session. >This doesn't happen with gnome-terminal. And unfortunately I can't test this anymore as I don't have gnome installed. Perhaps someone else with gnome-terminal installed could confirm this? Thanks!
> Perhaps this behavior of konsole is technically correct- but > gnome-terminal is smart enough to NOT insert a newline. This is > something people do all the time, copy and paste from "more" or "less" > into a vim session. Copy or paste into anything else, it doesn't have to be a vim session. Any other editor window will do. Whether konsole's behaviour is technically correct is the wrong approach, it's a pain. The old xterm never had any problems with this, konsole ought to not be worse than xterm. Dunno how xterm does it though. Volker
I can reproduce this bug in kconsole in KDE 3.2.3, but I believe that this is a new bug. I didn't encouter this grave problem before.
From Help file: "Normally, new-line characters are inserted at the end of each line selected. This is best for cut and paste of source code, or the output of a particular command. For ordinary text, the line breaks are often not important. One might prefer, however, for the text to be a stream of characters that will be automatically re-formatted when pasted into another application. To select in text-stream mode, hold down the Ctrl key while selecting normally." There is also a 'tip of the day' about this... "...that pressing Ctrl while selecting text will let Konsole ignore line breaks? "