Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[Bug 20621] Refine indentation for some if variants #1927

Merged
merged 2 commits into from Mar 13, 2018

Conversation

BerndN
Copy link
Contributor

@BerndN BerndN commented Mar 8, 2018

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

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
@BerndN
Copy link
Contributor Author

BerndN commented Mar 8, 2018

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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

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 :)

@montegoulding
Copy link
Member

@livecode-vulcan review ok d45b41c

@livecode-vulcan
Copy link

💙 review by @montegoulding ok d45b41c

@livecodepanos livecodepanos merged commit 9a26a98 into livecode:develop Mar 13, 2018
@BerndN BerndN deleted the patch-4 branch March 13, 2018 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants