Bug 285 - Copy and paste truncates by 3 characters
Summary: Copy and paste truncates by 3 characters
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.6 Beta 1
Hardware: Macintosh Mac OS
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-08-12 14:10 UTC by Andrew Young
Modified: 2011-12-11 04:28 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andrew Young 2011-08-12 14:10:09 UTC
Steps to reproduce.

1. open a .cs file
2. copy a piece of text like "_nameTextField"
3. paste it at the end of a line with a semi-colon ;
4. see that when pasting the text, it will truncate the last 3 characters of the text. only pastes "_nameTextFi".
Comment 1 Mike Krüger 2011-08-16 05:31:04 UTC
Can't repro. Do you have any of these:

Google Toolbar
Keyboard Maestro

See: http://monodevelop.com/Developers/Mac_Support
There is a section describing the clipboard problems.
Comment 2 Mikayla Hutchinson [MSFT] 2011-08-16 10:28:27 UTC
Mike, we fixed those clipboard problems for the main text editor in one of the MD 2.4.2 hotfixes, and for all of GTK in Mono 2.10.3.
Comment 3 Andrew Young 2011-08-16 12:42:05 UTC
No. I do not have any of those installed. Would the hotfix be in 2.6 beta 1?
Comment 4 Mikayla Hutchinson [MSFT] 2011-08-16 15:46:02 UTC
If you have Moo 2.10.3 or later you would have the fix.
Comment 5 Mikayla Hutchinson [MSFT] 2011-08-16 15:46:16 UTC
*Mono 2.10.3
Comment 6 Andrew Young 2011-08-16 15:47:19 UTC
I'm running Mono 2.10.4 but I'm still seeing this issue once in a while.
Comment 7 Mike Krüger 2011-08-17 00:27:31 UTC
mhutch: I know that this was fixed - was just a guess that it may be a problem >again<.

Ok then the next guess: Do you have 'on the fly' code formatting enabled ? I've just replaced our formatter with the newest version which is more robust.
Comment 8 Andrew Young 2011-08-17 00:34:54 UTC
I'm not sure. Where would you find that? I do notice that it fixes line spacing and new lines as I'm typing though. So, yes?
Comment 9 Mike Krüger 2011-08-17 03:32:55 UTC
In the IDE options.

Text editor -> Behavior -> On the fly code formatting

I think it's the 3rd check box there. I doubt that this is the problem, that's why I've asked first about the 'evil' programs.
Comment 10 Mike Krüger 2011-08-17 06:40:37 UTC
Some more questions:

Does that happen in text boxes inside monodevelop as well ?
Does this happen in non c# files as well ? try saving the file as .txt and try it again.
Comment 11 Andrew Young 2011-08-17 17:07:08 UTC
"On the fly" is checked.
No. It only affects the text editor (code) window.
I tried this on a .txt file and did not have this bug. It also isn't a consistent issue. Most of the time it doesn't happen but once in a while, perhaps with some magical incantation, the bug will appear and won't go away until I restart MonoDevelop.
Comment 12 Andrew Young 2011-08-17 17:08:01 UTC
Maybe it didn't happen when I tested with a .txt file because I had not yet "activated" the bug.
Comment 13 Alan McGovern 2011-09-30 10:40:16 UTC
Is this something we should block the release of 2.8 for?
Comment 14 Mike Krüger 2011-10-04 02:22:42 UTC
No there is something messing around with the monodevelop memory if we block 2.8 because of that we will never release 2.8. 

I don't think that we can find/fix that. If we had a reproduction case maybe, but I don't have an idea what that could be. There is a bug open that emacs corrupts md's cliboard buffer for example.
Comment 15 Mike Krüger 2011-12-11 04:28:38 UTC
I think it was the formatting engine / 2.8 fixed that.