Skip to content

Weird line breaks in a chained but below column length codeblock #298

Description

@CosmoMyzrailGorynych

Input: (UI bindings from my reactive framework for Godot, condensed)

extends Node

func _ready() -> void:
	S.declare([
		S.bind_label(item_name, title),
		S.bind_label(item_description, description),
		S.bind_label(cost, cost_label),
		S.bind_label(buy_switch_text, buy_or_switch_label),
		S.bind_visible(active, self),
		S.bind_visible(should_show_cost, cost_container),
	]).bind(self)

Output:

extends Node


func _ready() -> void:
	S \
			.declare([
		S.bind_label(item_name, title),
		S.bind_label(item_description, description),
		S.bind_label(cost, cost_label),
		S.bind_label(buy_switch_text, buy_or_switch_label),
		S.bind_visible(active, self),
		S.bind_visible(should_show_cost, cost_container),
	]) \
			.bind(self)

While the code is still valid, it seems that it trips some check for the continuation lines? (double indents are very suspicious here)

Removing .bind(self) stops triggering this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions