Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doubled indentation in anon function body #577

Closed
Gama11 opened this issue Apr 12, 2020 · 0 comments
Closed

doubled indentation in anon function body #577

Gama11 opened this issue Apr 12, 2020 · 0 comments
Labels
indentation Indentation is incorrect regression

Comments

@Gama11
Copy link
Member

Gama11 commented Apr 12, 2020

1.9.2:

class PlayState extends FlxState
{
	function createAttachmentControls():Void
	{
		add(attachmentDropDown = new FlxUIDropDownMenu(modelDropDownLoc.x, modelDropDownLoc.y - 30,
			FlxUIDropDownMenu.makeStrIdLabelArray(FlxGamepadAttachment.getConstructors()), function(attachment)
		{
			var gamepad = FlxG.gamepads.lastActive;
			if (gamepad != null)
				gamepad.attachment = FlxGamepadAttachment.createByName(attachment);
			updateConnectedGamepads(true);
		}, new FlxUIDropDownHeader(150)));
	}
}

1.10.0 - the anon function body is now indented with two tabs:

class PlayState extends FlxState
{
	function createAttachmentControls():Void
	{
		add(attachmentDropDown = new FlxUIDropDownMenu(modelDropDownLoc.x, modelDropDownLoc.y - 30,
			FlxUIDropDownMenu.makeStrIdLabelArray(FlxGamepadAttachment.getConstructors()), function(attachment)
		{
				var gamepad = FlxG.gamepads.lastActive;
				if (gamepad != null)
					gamepad.attachment = FlxGamepadAttachment.createByName(attachment);
				updateConnectedGamepads(true);
		}, new FlxUIDropDownHeader(150)));
	}
}

I guess the 1.9.2 version could be considered buggy as well, since the {} of the anon function are not indented relative to the call.

@Gama11 Gama11 added indentation Indentation is incorrect regression labels Apr 12, 2020
AlexHaxe added a commit to AlexHaxe/haxe-formatter that referenced this issue Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indentation Indentation is incorrect regression
Projects
None yet
Development

No branches or pull requests

1 participant