Browse Source

Add newline when dropping nodes into editor (#754)

Co-authored-by: k-expon <[email protected]>
KIM JISU 8 months ago
parent
commit
996a7aefe6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/scene_tools/preview.ts

+ 1 - 1
src/scene_tools/preview.ts

@@ -131,7 +131,7 @@ export class ScenePreviewProvider
 					// We assume that if the user is dropping a node in an empty line, they are at the top of
 					// We assume that if the user is dropping a node in an empty line, they are at the top of
 					// the script and want to declare an onready variable
 					// the script and want to declare an onready variable
 					return new vscode.DocumentDropEdit(
 					return new vscode.DocumentDropEdit(
-						`@onready var ${node_name_to_snake(label)}: ${className} = ${qualifiedPath}`,
+						`@onready var ${node_name_to_snake(label)}: ${className} = ${qualifiedPath}\n`,
 					);
 					);
 				}
 				}