MattHiggs

scite for autoit indent

2 posts in this topic

#1 ·  Posted (edited)

Hey, so I know this is trivial at best, and it really doesn't bother me all that much, I just wanted to (if it wasn't already) communicate an inconsistency in Scite for AutoIT's automatic indent functionality.  I have noticed that, whenever I am working with nested "if" statements, when closing the internal "if" statement, if the next line happens to be an "Else then" or "Else" statement of an external "if" statement, the line will maintain the same amount of white space between the beginning of the new line and the first character of code as the internal if statement and not "Tab Back" for lack of a better word.  Example:

bznTsvg.png

But adding even a single line between the closing of the internal and the "Else" of the external is fine, even if it is blank:

TJ0SM9c.png

From what I can tell, Scite seems to think (as far as formatting goes) that the "endif" of the internal loop also closes the external statement, which can be seen if you try to collapse the external statement (or maybe its like that by design, idk?):

BjxVfX1.png

However, everything compiles and runs perfectly, and I really don't care all that much.  I just figured I would make developers aware if they weren't already.  AutoIT is without a shadow of a doubt my favorite scripting language, just figured I put in my two cents.

Edited by MattHiggs

Share this post


Link to post
Share on other sites



Yea I know and it is quite hard to make it perfect. Just look at AutoItIndentFix.lua for all corrections performed.
In this case there is an issue with the retrieval of the previous header level when the last statement is an EndIf.

Always open to suggestions when somebody has a  solution for this one.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now