From 931e9b3bebb58d6e126a531f5a3706bc6664a96d Mon Sep 17 00:00:00 2001 From: Sebastian Morr Date: Tue, 15 Sep 2020 22:34:22 +0200 Subject: [PATCH] Don't mangle tab in tree content, don't die if win script prints errors --- node.gd | 2 +- repository.gd | 1 + terminal.gd | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/node.gd b/node.gd index e7bd125..3ff03f1 100644 --- a/node.gd +++ b/node.gd @@ -96,5 +96,5 @@ func _input_event(_viewport, event, _shape_idx): if event.button_index == BUTTON_RIGHT: if event.pressed: var input = get_tree().get_current_scene().find_node("Terminal").find_node("Control").find_node("Input") - input.text += $ID.text + input.text += id input.caret_position = input.text.length() diff --git a/repository.gd b/repository.gd index 0ffc14a..b6eb94f 100644 --- a/repository.gd +++ b/repository.gd @@ -79,6 +79,7 @@ func update_objects(): pass "tree": n.children = tree_children(o) + n.content = n.content.replacen("\t", " ") "commit": var c = {} c[commit_tree(o)] = "" diff --git a/terminal.gd b/terminal.gd index a7fb065..f53601c 100644 --- a/terminal.gd +++ b/terminal.gd @@ -81,5 +81,5 @@ func clear(): output.text = "" func check_win_condition(): - if repo.shell.run("bash /tmp/win 2>&1 >/dev/null && echo yes || echo no") == "yes\n": + if repo.shell.run("bash /tmp/win 2>/dev/null >/dev/null && echo yes || echo no") == "yes\n": main.show_win_status()