Skip to content

Strange indentation behaviour with function calls in top-level definitions of multi-line arrays #23

@maxcutlyp

Description

@maxcutlyp

Specifically, if

  • the last item in the array is a function call (i.e. has (...) at the end - note that it must have the ( as well as the ))
  • the last item in the array does not have a trailing ,
  • the array is defined at the first indentation level
  • the closing ); is on its own line

then the line after the closing ); will be indented one tabstop further than it should be. If any of the above conditions are not met, indentation behaves as expected.

See the below video:
https://user-images.githubusercontent.com/46881987/151777293-b2116c88-c616-4046-bead-420b19cfcee4.mp4

Also note the double indentation of the array contents (and the closing );), although this is not the focus of this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions