Page 1 of 1
[FIXED] First line unindentation too aggressive?
Posted: 10 Apr 2015 11:18
by Marco
Code: Select all
* Scripting: Now loaded scripts are automatically unindented, i.e. the first
line's indent is removed from all lines. That way you can easier copy and
paste scripts, e.g. from this change log, without the need to manually
left-align the code blocks first.
However I have a script file that contains a single script. As such, the first line is indented as per long-time syntax rules. Now, loading it shows a popup menu where I can see the single lines of code, instead of working normally. Either this is a bug, or I should change my script-writing habits, I don't know…
Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 13:02
by admin
Can you give an example? I don't remember a rule by which the first line of a script should be indented.
Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 13:23
by bdeshi
frankly this is ridiculous.
No matter whether the lines have original 1-space indent or phpbb-supplied +4 spaces,
copy code and either ::load <clipboard>; or paste into Run Script.
more maddening: if the first line has more spaces than later lines, the folloing lines are cropped!
becomes

Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 13:31
by admin
Looks like a little logic flaw...

Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 13:36
by bdeshi
Please just undo the change. Correct indentation is and should remain Users' duty. XY is trying to be too clever and shooting itself in the knee.
[I think that's more painful than injuring the foot] 
Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 14:29
by klownboy
When I mentioned cutting and pasting from the beta notes and receiving errors in the other thread, I wasn't expecting anything to be done to scripting. I didn't happen to see the note that stated the function line can not be indented. I'm used to having to adjust the line indents when cutting and pasting from the forum and have no problems doing that.

Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 14:57
by admin
Okay, you all can relax now.

Re: First line unindentation too aggressive?
Posted: 10 Apr 2015 21:03
by Marco
Works as usual now, thanks

Re: [FIXED] First line unindentation too aggressive?
Posted: 11 Apr 2015 08:43
by bdeshi
thanks, Doc, the foot's better now.

Re: [FIXED] First line unindentation too aggressive?
Posted: 11 Apr 2015 09:48
by admin
SammaySarkar wrote:thanks, Doc, the foot's better now.

Note that I fixed all the issues you mentioned, so you could as well tweak it on. I have done so.