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"
I can confirm this problem. IIRC it started when "Cursor beyond end of line" functionality was added to mcedit.
(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)
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 :)
Norbert, Lars: do you both use gnome-terminal to reproduce it?
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.
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
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...
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
Where are we with this? Adding KDE to the conversation.
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.
4.10 will be publicly released very soon. :)
Can anyone confirm that 4.10 fixed the problem?