Closing curly bracket and cursor position inside tag based cfc <cfscript> block is indented one tabstop to the left of where it should be
Only happening inside tag based CFCs. Fully scripted CFCs and <cfscript> blocks in .cfm files are good.
Given the following code, '|' being the cursor position:
<cffunction>
<cfscript>
if (a == b)
{|}
</cfscript>
</cffunction>
Hitting enter comes out like:
<cffunction>
<cfscript>
if (a == b)
{
|
}
</cfscript>
</cffunction>
Thanks @joshwines
I can't think of an immediate way to fix this. I'll try to find some time to look into it over the weekend. Hopefully it's something that can be fixed through this package and not something hard coded into Sublime...
I think this should be enough to fix this particular issue. There may be more problems with square brackets or parens. I haven't tested so let me know if you come across any weird behavior.
Thanks again!
Thanks, looking good.
I still have this issue. I've checked my files to be sure I'm using the latest release.
Did some investigation this morning because this has been driving me nuts. Found that the following commit broke it again:
df6870375d9a5c87bbc6b6a0d5bb118af64ec586
The particular lines that broke it were the removal of 34. and 35. in ColdFusion.tmLanguage:
<key>name</key>
<string>meta.tag.block.cf.script.cfml</string>
I've fixed it locally by adding those lines back in but I presume they were removed for a reason and I don't really understand the code so haven't made a commit and pull request.
HTH
Dominic