There are still more issues with the indent.
given this block of code:
local function myFunction(event)
if event.phase == "ended" then
do stuff
end
return true
end
If I put my cursor at the beginning of the “return true” line and hit enter, to open space between the end above it and the return, the return true back-indents to the beginning of the line.
I’m still not fond of having to hit enter to have the indention work…
Given the same code above if I add another “if” after the end and before the return I end up with this:
local function myFunction(event)
if event.phase == "ended" then
do stuff
end
if somecondition then
somevar = somethingelse
end
return true
end
But since I have to hit enter to get the “end” to back indent, I then end up with:
local function myFunction(event)
if event.phase == "ended" then
do stuff
end
if somecondition then
somevar = somethingelse
end
return true
end
And I have to erase the four spaces and the return to close up that blank line.
I know white space can improve readability, but it makes the program a lot longer and you have to scroll your editor a lot more (yea, I know I should fold my functions, but . . . )
Rob
[import]uid: 19626 topic_id: 23072 reply_id: 99406[/import]