Autosizing of completions

This commit is contained in:
bleeptrack 2020-10-06 12:30:24 +02:00
parent e7404200dd
commit a0a7202684
2 changed files with 7 additions and 1 deletions

View file

@ -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 = {}

View file

@ -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__ = {