Skip to content

Auto-Indent Seems Confused by 'exit function' #1

@hischampion

Description

@hischampion

I have several lines in a file where 'exit function' seems to block tracking of an if, else indentation.

if (condition) then
   exit function
elseif (other condition) then
   other logic
   exit function
else 
   more logic

This will be indented as:

if (condition) then
   exit function
   elseif (other condition) then
       other logic
       exit function
       else 
          more logic

I'm not sure the bug is only limited to 'exit function', but this isn't the correct behavior.

The 'exit function' directive should be completely ignored for indentation, I am inclined to think. "End Function" is the directive that marks the end of a function, but "exit function" is just an instruction to cut the function short at that point. One defines structure, and the other is a run-time command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions