Bug 217276 - When copying multiline text, it also copies non-existing trailing spaces
When copying multiline text, it also copies non-existing trailing spaces
Product: Fedora
Classification: Fedora
Component: slang (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
Depends On:
  Show dependency treegraph
Reported: 2006-11-26 07:11 EST by Raoul
Modified: 2007-11-30 17:11 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-02-23 06:13:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Raoul 2006-11-26 07:11:55 EST
Description of problem:

I think this "feature" is new because i don't remember it in older midnight
commander versions.

Here is the problem by example:

1. open gnome-terminal
2. open a text file that contains more than 1 lines of text with mcedit
3. select 2 or more lines of text with the mouse by holding Shift key on the
4. copy the selected text and paste it to another text editor.
5. it stupidly pastes trailing spaces together with the text.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. already described
Actual results:
copies trailing spaces, which actually do not exist in the text. It assumes that
the empty space between the end of each line of text and the right edge of the
terminal is filled with bloody spaces!

Expected results:
copy the exact portion of text and the actual spaces if any.
Comment 1 Leonard den Ottolander 2006-11-27 16:46:41 EST
Seems more like an issue with gnome-terminal than mc. Have you tried other
command line editors?

I cannot reproduce this with a fairly recent mc (2006-10-15) with an older
gnome-terminal (on FC4).
Comment 2 Raoul 2006-11-27 19:46:49 EST
I also use vi, from which the text can be copied correctly.

I had never encountered this issue in FC4. IIRC, it started to be an issue with

If you cannot reproduce it with a recent mc on FC4, then you are absolutely
right that it might be some other application's issue.

However, I tried to copy text from mcedit, while it runs in xterm. The exact

1) mcedit text.file  (in xterm)
2) select 2 or more lines of text while Lshift is pressed on the keyboard
3) paste the text with the middle mouse button in another editor.

It still pastes trailing spaces from xterm.
Comment 3 Raoul 2006-11-27 19:49:24 EST
I would also like to apologize for the bad language in the initial bug
submission. This was just a moment of anger. I know that these issues happen. :)
Comment 4 Curtis Doty 2006-12-09 23:00:32 EST
I've seen two similar but distinct symptoms on MS Windows client SecureCRT.
Exact same client platform side-by-side terminals for very old RHL or FC1?
systems work just fine. But more recent FC4+? terminals produce one or both of

 - single trailing space injected on any lines that are colorized as a multiline
context block. I.e. # comments.

 - more recently, selecting multiline blocks in mcedit now is worse, as entire
editor/window width is padded with trailing spaces on every line in the block.

I've always assumed nobody wants to fix due to cross-platform issue. And I'm
completly ignorant of proper termcap usage and debugging. But happy to run tests
if desired.
Comment 5 Jindrich Novy 2006-12-11 04:14:58 EST
Adding Miroslav to Cc as it doesn't seem to be a fault of mc but some terminal
Comment 6 Miroslav Lichvar 2006-12-13 09:49:41 EST
It's a bug in slang.
Comment 7 Miroslav Lichvar 2007-02-19 13:48:25 EST
Fixed in slang-2.0.7-1.fc6.

Note You need to log in before you can comment on or make changes to this bug.