Bug 17766 - Decreasing tab on single line bounces back to formatting spot.
Summary: Decreasing tab on single line bounces back to formatting spot.
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 4.3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2014-02-13 18:12 UTC by Adam Patridge
Modified: 2014-03-28 11:41 UTC (History)
2 users (show)

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

Example of issue. (102.33 KB, image/gif)
2014-02-13 18:12 UTC, Adam Patridge

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 Adam Patridge 2014-02-13 18:12:50 UTC
Created attachment 6043 [details]
Example of issue.

If I select a single line and hit Shift+Tab to decrease the tab count before it, it works as expected until the last tab. With one tab remaining, hitting Shift+Tab will cause the line to bounce back to where it would be according to the C# formatting policy.

Given this code...

namespace SomeClass {
	public class X {
		int Y { get; set; }

...if I put the cursor in front of the "i" in "int" and hit Shift+Tab, the first time will decrease the indent to line up with "public", but the second will bounce the line back to the original position. If I try to decrease the indent on the class declaration, it will not move at all (only one tab left).

Decreasing indent with the whitespace selected as well or with more than one line works just fine.
Comment 1 Mike Krüger 2014-02-14 04:21:56 UTC
Comment 2 Ram Chandra 2014-03-28 11:39:48 UTC
I have checked this issue on master builds.

With the help of "bug description", I put the cursor in front of "ctor" and press "Shift+Tab", it is decreasing the indent and not bounce back to the original position. Now, I am also able to decrease the indent on the class declaration.

I also observed that when I decreasing indent with the whitspace selected as well or with more than one line is not working. 

Hence, Reopening this issue.

Screencast: http://www.screencast.com/t/GiKkisuFF

Environment Info:

Mac OS X 10.7.5
Xamarin Studio: 4.2.4 (build 266)

Build Information
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Build date: 2014-03-20 12:34:27-04
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

Please let me know if I have to check something else.
Comment 3 Mike Krüger 2014-03-28 11:41:21 UTC
works in master - it's not in the 4.2.4 branch.