Skip to content

GDScript, code commenting behavior is probably incorrect #363

@0x01011970

Description

Code commenting behavior is probably incorrect in .gd files

See this scenario :

func _ready() -> void:
	align_stuff()
	pass

Commenting the second line (using hotkey ctrl + /) gives :

func _ready() -> void:
#	align_stuff()
	pass

The # is at the beginning of the line and not at the beginning of the text.

PyCharm (for Python) and Godot Editor put the # character at the beginning of the text :

func _ready() -> void:
	#align_stuff()
	pass

This may be the root cause of the issue we are experiencing with auto formatting : #362

Since the # character is at the very beginning of the line, the auto formatter probably thinks the indentation is wrong, and adds unnecessary/invalid tabs to commented lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions