mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
Autosizing of completions
This commit is contained in:
parent
e7404200dd
commit
a0a7202684
2 changed files with 7 additions and 1 deletions
|
@ -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 = {}
|
||||
|
|
|
@ -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__ = {
|
||||
|
|
Loading…
Reference in a new issue