EmmyLua / IntelliJ-EmmyLua

Lua IDE/Debugger Plugin for IntelliJ IDEA
https://emmylua.github.io
Apache License 2.0
1.75k stars 292 forks source link

If statement auto closes incorrectly in function in table in do...end block #365

Open HaniiPuppy opened 4 years ago

HaniiPuppy commented 4 years ago

IDEA version | 2020.1.3 Community edition, build #IC-201.8538.31 EmmyLua version | 1.3.3.150-IDEA201 OS | Mac OS X 10.13.6

What are the steps to reproduce this issue?(重现步骤?)

  1. Create a do ... end block
  2. Declare a table in that block
  3. Declare a function in that table
  4. Try to create an if-statement block in that function

What happens?(出现什么问题?)

Hitting return after the "then" creates a closing curly bracket to match with the table's opening curly bracket.

What were you expecting to happen?(期望?)

For hitting return after the "then" to create an "end" to match with the "if" statement

Any logs, error output, etc?(有没有什么log, error输出?)

No

Any other comments?(其它说明)

Short video of this happening: https://mega.nz/file/bfh0BCiQ#gZ5lhIHDild_zTklfdwjpWJJz--wwz5hlDoiUZNiwWo