Bug 2035 - SurroundWith templates do not respect the indentation level
Summary: SurroundWith templates do not respect the indentation level
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: Macintosh Mac OS
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-11-15 10:47 UTC by Alan McGovern
Modified: 2012-02-08 05:25 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Alan McGovern 2011-11-15 10:47:41 UTC
When I insert template using autocomplete or "Surround with" feature, then Tab character is inserted as only one space. It should insert "Tab width" spaces when I use Convert tabs to spaces.

MonoDevelop: 2.8.2
Runtime: Mono 2.10.6 (tarball Fri Sep 16 00:13:06 EDT 2011)
Operating System: Mac OSX (Unix 10.8.0.0)
Distributor: Xamarin
Comment 1 Alan McGovern 2011-11-15 10:49:02 UTC
I assume the best way to implement this would be to merge the template into the code file and then run the auto-formatting service thingy to fix the indentation. We should not really be trying to implement this inside the CodeTemplate itself.
Comment 2 Mike Krüger 2012-01-24 03:52:18 UTC
Seems to work for me - do you have any use case ?
Comment 3 Mike Krüger 2012-02-07 03:08:19 UTC
Can't repro it in any branch.
Comment 4 Alexander Riman 2012-02-08 05:25:26 UTC
This does not work in MD 2.8.6.4.
Steps for reproduce this:
1) You need to set Code Formatting/C# source code/Convert tabs to spaces
2) Make sure that you have some template with Tab character in it (for example, if)
3) Select some code and execute command "Surround with".
4) You will see, that selected code will be wrong indented: it will be placed after one space instead of 4 spaces (that are equal to one tab).