diff --git a/terminal.gd b/terminal.gd index 67b1b1c..d77d51e 100644 --- a/terminal.gd +++ b/terminal.gd @@ -134,6 +134,7 @@ func regenerate_completions_menu(new_text): completions.clear() + var filtered_comp = [] for c in comp: if c != new_text: @@ -153,6 +154,11 @@ func regenerate_completions_menu(new_text): var idx = git_commands.find(subcommand) if idx >= 0: child.set_text(1, git_commands_help[idx]) + + completions.margin_top = -min(filtered_comp.size() * 35 + 10, 210) + + + func relevant_subcommands(): var result = {} diff --git a/terminal.tscn b/terminal.tscn index 3924f3c..08ddb27 100644 --- a/terminal.tscn +++ b/terminal.tscn @@ -56,7 +56,7 @@ __meta__ = { anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = -223.0 +margin_top = -311.0 columns = 2 hide_root = true __meta__ = {