Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 354471 - app-misc/mc: paste from mcview or mcedit adds (nonexisting) spaces to the tail of lines
Summary: app-misc/mc: paste from mcview or mcedit adds (nonexisting) spaces to the tai...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alex Alexander (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 13:46 UTC by norbert kamenicky
Modified: 2013-03-14 08:07 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
konsole-4.7.2-delete-useless-chars.patch (konsole-4.7.2-delete-useless-chars.patch,3.15 KB, patch)
2011-10-21 08:35 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description norbert kamenicky 2011-02-11 13:46:33 UTC
Lets try this:

 echo -e "one\ntwo\nthree" >file

 mcview file

  - now highlight all three lines (shift + left mouse), then press F3  

 vi new_file

 press "i" (for insert), then middle mouse, "ESC", "ZZ" (to save and leave vi)

 ls -l *file 

-rw-r--r-- 1 nx nx  14 Feb 11 14:14 file
-rw-r--r-- 1 nx nx 521 Feb 11 14:23 new_file

"new_file" is extremly long, because mc* works with fixed line length and therefore puts spaces to the end of every screen line (which has 173 chars in my case)

This bug makes pasting from mc* to other apps unusable,
(especially to e-mail clients).

This problem persists for a long time in mc, last tested on:

app-misc/mc-4.7.5.1  USE="X edit gpm nls slang -ncurses -samba"
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-02-11 15:02:45 UTC
I can confirm this problem. IIRC it started when "Cursor beyond end of line" functionality was added to mcedit.
Comment 2 norbert kamenicky 2011-02-11 17:48:09 UTC
(In reply to comment #1)
> it started when "Cursor beyond end of line" functionality was added to mcedit.

Yes, this is very probable ...

but, this really broken "feature" resists even if I disable

 F9 => Options => General => "Cursor beyond end of line"   in mcedit, 

even what's worse, in mcview I can't find a possibility to change anything
(except of patch to sources of course)
Comment 3 Alex Alexander (RETIRED) gentoo-dev 2011-02-14 07:58:50 UTC
Can you please report this upstream using their ticket system?

http://midnight-commander.org/report

Type the upstream ticket URL in the URL field when you do so we can check its status from time to time.

Thanks :)
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2011-10-20 19:36:26 UTC
Norbert, Lars: do you both use gnome-terminal to reproduce it?
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-10-20 20:23:21 UTC
I have the problem in kde-base/konsole. I'm usually not using any other terminal emulatior. But a quick test on xterm doesn't reveals this behavior.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2011-10-20 20:58:36 UTC
mc upstream guys say it's usually exposition of terminal's bug:

https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/826360
https://bugzilla.redhat.com/show_bug.cgi?id=560721
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-10-21 05:30:17 UTC
Unfortunately the patch from your posted redhat bug is already included in konsole-4.7.2 (latest version in portage and the onyl one I checked ;)). So the problem seems to be deeper in the kde-base/konsole package...
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-10-21 08:35:28 UTC
Created attachment 290433 [details, diff]
konsole-4.7.2-delete-useless-chars.patch

I found a two years old kde bug[1] where the problem is under discussion. There seems to be some activity lately and a patch was proposed. Attached is a slightly adjusted patch for konsole-4.7.2 which fixes the problem for me. Though the original patch is still considered work in progress by upstream.

[1] https://bugs.kde.org/show_bug.cgi?id=188528
Comment 9 Alex Alexander (RETIRED) gentoo-dev 2013-02-02 04:37:41 UTC
Where are we with this? Adding KDE to the conversation.
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-02-03 12:16:30 UTC
Seems like they have committed something for konsole-4.10:

  http://commits.kde.org/konsole/ca9dd11bf5e1b3bf5c6c17de34d5d3bf4d3baf38

So maybe we just want to wait for kde-4.10.

I've tried to backport this patch to konsole-4.9.5 but just got compilation errors.
Comment 11 Michael Palimaka (kensington) gentoo-dev 2013-02-03 12:49:13 UTC
4.10 will be publicly released very soon. :)
Comment 12 Chris Reffett (RETIRED) gentoo-dev Security 2013-02-14 20:08:37 UTC
Can anyone confirm that 4.10 fixed the problem?