Closed maxlevesque closed 9 years ago
That's not a comment-only bug:
program toto
print*, "this is a function I like"
print*, "ok"
end program toto
Of course, word subroutine
produces same effects:
program toto
print*, "this is a subroutine I like"
print*, "ok"
end program toto
Thanks for posting! The auto indent regex is set to trigger any time subroutine
or function
occur and aren't immediately preceded by end
. I'll see if I can make some simple tweaks to it so it won't trigger when those words are in comments or in strings.
Hi @tomedunn , I greatly appreciate all your work. I hope my reports help to improve the life of all the poor-fortran-developpers ;) nearby and do not only bring more work to you!
The reports are hugely helpful @maxlevesque . I'm rarely able to use Atom for writing Fortran programs since I'm typically programming remotely via the terminal using Vim. So while it's relatively easy for me to test changes against the host of static Fortran files I have, it takes quite a bit of effort to check dynamic behaviors such as auto-indenting.
Hello, It's been a while I'm having trouble with auto-indent in a very long module. I didn't take the time to track back the bug in language-fortran's auto-indent. Here it is! :)
Let's type this in my favorite Atom editor:
Now, let's apply Edit > Lines > Auto-Indent ...
Now let's replace
function
in the declaration ofz
byanything else
and apply again Auto-Indent ...Conclusion
When the word function is found in a line, even if it is in a comment, then auto-indent gets wrong.