[Bug 20621] Refine indentation for some if variants #1927
Conversation
http://quality.livecode.com/show_bug.cgi?id=20621 on foo if foo() then if doo() then code else code -- <--- else code end if -- comment end foo on foo if foo() then if doo() then code -- <--- else code end if end if -- comment end foo
no bugfix note since there is already one for that bug number |
return item 1 of sTextFormatKeywordMap["else"] | ||
end if | ||
|
||
if "then" is among the words of pPreviousLine and token -1 of pPreviousLine is not "then" \ | ||
and token 1 of pPreviousLine is "if" and token - 1 of pLine is "else" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BerndN the space between -
& 1
here gives me the hebegeebes... not sure if it does what we expect either... token - 1 of pLine
. Actually same above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could change it to "last token" or "token -1" if I knew how. Do I add a pull-request to this current one with the changes concerning the same lines as this one? I am using the web interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you go to your fork you can choose the branch patch-4
and then edit the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, that worked, no more hebegeebees :)
@livecode-vulcan review ok d45b41c |
💙 review by @montegoulding ok d45b41c |
http://quality.livecode.com/show_bug.cgi?id=20621
on foo
if foo() then
if doo() then code else code -- <---
else
code
end if
-- comment
end foo
on foo
if foo() then
if doo() then code -- <---
else
code
end if
end if
-- comment
end foo