mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
Close completions after running a command
This commit is contained in:
parent
dafc5126f1
commit
0a3e97167c
4 changed files with 7 additions and 7 deletions
2
node.gd
2
node.gd
|
@ -113,7 +113,7 @@ func _input(event):
|
|||
if event.is_action_pressed("click"):
|
||||
held = true
|
||||
elif event.is_action_pressed("right_click"):
|
||||
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("Input")
|
||||
input.text += id
|
||||
input.caret_position = input.text.length()
|
||||
if event.is_action_released("click"):
|
||||
|
|
|
@ -40,7 +40,6 @@ anchor_bottom = 0.0
|
|||
margin_right = 949.0
|
||||
margin_bottom = 1070.0
|
||||
size_flags_horizontal = 3
|
||||
file_browser_active = false
|
||||
|
||||
[node name="Terminal" parent="HSplitContainer" instance=ExtResource( 1 )]
|
||||
anchor_right = 0.0
|
||||
|
|
|
@ -35,7 +35,8 @@ func _ready():
|
|||
var all_git_commands = repository.shell.run("git help -a | grep \"^ \\+[a-z-]\\+ \" -o | sed -e 's/^[ \t]*//'")
|
||||
git_commands = Array(all_git_commands.split("\n"))
|
||||
git_commands.pop_back()
|
||||
print(git_commands)
|
||||
|
||||
completions.hide()
|
||||
|
||||
func _input(event):
|
||||
if history.size() > 0:
|
||||
|
@ -62,6 +63,7 @@ func send_command(command):
|
|||
history_position = history.size()
|
||||
|
||||
input.editable = false
|
||||
completions.hide()
|
||||
|
||||
if thread != null:
|
||||
thread.wait_to_finish()
|
||||
|
|
|
@ -40,9 +40,8 @@ margin_bottom = 1045.0
|
|||
size_flags_vertical = 3
|
||||
|
||||
[node name="Output" type="RichTextLabel" parent="VBoxContainer/TopHalf"]
|
||||
margin_top = 4.0
|
||||
margin_right = 1920.0
|
||||
margin_bottom = 1045.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_vertical = 3
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
custom_fonts/normal_font = ExtResource( 4 )
|
||||
|
|
Loading…
Reference in a new issue