Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intelligent prompt in the script editor of Godot 4.x version not sorted by the shortest text first #81104

Closed
kaluluosi opened this issue Aug 29, 2023 · 5 comments

Comments

@kaluluosi
Copy link

Godot version

4.1

System information

Win10, Core I7-9700,RTX2080

Issue description

Why is the intelligent prompt in the script editor of Godot 4.x version not sorted by the shortest text first, but randomly sorted? For example, the label clearly has a text variable, but it is not prioritized at the top. Instead, the constant with the longest text is sorted first with the text starting at the beginning?

image
image

I remember that this behavior was not present in Godot 3.x.

Steps to reproduce

Just try the issue description.

Minimal reproduction project

N/A

@dalexeev
Copy link
Member

CC @ajreckof

@ajreckof
Copy link
Member

I remember this was already fixed can someone try on master to see if it is something different then what I already fixed.

@dalexeev
Copy link
Member

can someone try on master to see if it is something different then what I already fixed

Can't reproduce this in master for Label.text:

I noticed that this happens for notification(), probably because the method belongs to Object and the NOTIFICATION_ constants are inherited classes. notification() is rarely used in custom code, but could it be possible to make constants take less precedence than properties and methods if the user doesn't start typing them in uppercase?

@ajreckof
Copy link
Member

ajreckof commented Sep 3, 2023

okay so this was the order I decided to go for and what you suggest is inverting iii and iv as this would rank them in the ordre you described. Effectively it seems better for scope to matter less then good capitalization
Capture d’écran 2023-09-03 à 19 39 43
this would be pretty easy to change if needed

@AThousandShips AThousandShips changed the title Why is the intelligent prompt in the script editor of Godot 4.x version not sorted by the shortest text first, but randomly sorted? Intelligent prompt in the script editor of Godot 4.x version not sorted by the shortest text first Sep 3, 2023
@akien-mga
Copy link
Member

Fixed in master IIUC, and further improved by #81304.

@akien-mga akien-mga added this to the 4.2 milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants