godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.52k stars 149 forks source link

Pasting a function under another function does not indent it correcly #483

Open jeancallisti opened 1 year ago

jeancallisti commented 1 year ago

Godot version

-

VS Code version

1.80.0

Godot Tools VS Code extension version

1.3.1

System information

Windows 10

Issue description

Scenario :

  1. Open VSCode with Godot tools 1.3.1 installed

  2. Create a .gd file

  3. Write a dummy function inside of if. For example : func fooFunction(): # Line 1 pass # Line 2

  4. Select the function's text, and copy it (Ctrl+C)

  5. Place cursor on line 3 or on line 4, press Ctrl+V

Expected(good) :

func fooFunction():
     pass

func fooFunction():
     pass 

Observed (bad) :

func fooFunction():
     pass 

     func fooFunction():
          pass 

Steps to reproduce

-