Bug 5712 - Saving a layout file moves the cursor to the beginning of the file
Summary: Saving a layout file moves the cursor to the beginning of the file
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2012-06-18 17:12 UTC by Justin
Modified: 2012-06-21 13:36 UTC (History)
0 users

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 Justin 2012-06-18 17:12:00 UTC
When making changes in the source view of the designer, saving the file causes the cursor to jump to the beginning of the file.

On a side note, saving also clears out all empty lines and converts my tabs to spaces... Please let me format the file how I want it formatted.
Comment 1 Lluis Sanchez 2012-06-21 13:29:46 UTC
This has been fixed and the fix will be included in upcoming releases.
The formatting problem is a bit tricky. If you do changes in the designer, the designer will rewrite the xml, and the spacing is likely to change. I fear we have no solution for this.
Comment 2 Justin 2012-06-21 13:36:44 UTC
Thanks for getting this fixed so fast!

As for the formatting problem, there has got to be a way, at least partially...  I'm just after what the Eclipse designer tool does.

In Eclipse, the layout designer tool only rewrites the XML if you make changes via the UI portion of the designer (which I never use).  As long as I am editing the XML it doesn't rewrite and I don't lose my formatting.

Would it be possible to do that?  I never modify my UI graphically... I always do it in XML because I want to control my formatting.