vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

asformat: Indentation issues with nested mixed blocks

Open esidegallery opened this issue 2 years ago • 2 comments

Confirmed in a fresh installation of the latest VSCode with the ActionScript & MXML extension on Windows 10 x64.

Nested object & function blocks and their opening & closing braces are incorrectly indented:

ASFormat Indentation

esidegallery avatar Jul 18 '22 10:07 esidegallery

Copying the original code below for easy copy/paste if I need to reference it again in the future:

public class Test extends EventDispatcher
{
	public function Test()
	{
		var alert:Alert = Alert.show(
			"Are you sure?",
			"Close",
			new ArrayCollection([
				{
					label: "Save",
					triggered: function():void
					{
						dispatchEventWith("save");
					}
				},
				{
					label: "Discard",
					triggered: function():void
					{
						dispatchEventWith("discard");
					}
				}
			]));
	}
}

joshtynjala avatar Aug 10 '22 20:08 joshtynjala

apache/royale-compiler@b495634efff9c9d862e7205295abdceb8f3e69cf

joshtynjala avatar Aug 10 '22 21:08 joshtynjala