Don't mangle tab in tree content, don't die if win script prints errors

This commit is contained in:
Sebastian Morr 2020-09-15 22:34:22 +02:00
parent a07deac051
commit 931e9b3beb
3 changed files with 3 additions and 2 deletions

View file

@ -96,5 +96,5 @@ func _input_event(_viewport, event, _shape_idx):
if event.button_index == BUTTON_RIGHT: if event.button_index == BUTTON_RIGHT:
if event.pressed: if event.pressed:
var input = get_tree().get_current_scene().find_node("Terminal").find_node("Control").find_node("Input") 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() input.caret_position = input.text.length()

View file

@ -79,6 +79,7 @@ func update_objects():
pass pass
"tree": "tree":
n.children = tree_children(o) n.children = tree_children(o)
n.content = n.content.replacen("\t", " ")
"commit": "commit":
var c = {} var c = {}
c[commit_tree(o)] = "" c[commit_tree(o)] = ""

View file

@ -81,5 +81,5 @@ func clear():
output.text = "" output.text = ""
func check_win_condition(): 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() main.show_win_status()