-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Data type search only searches text before cursor position instead of full search string #8203
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
Comments
It can be very helpful. Maybe a configuration option would be better? |
The design was intentional. Users can arrow left and right to control what is shown in the list. If you think of the feature as a 'starts with' filter instead of a 'search', then it makes sense the way it is now. I'm not opposed to changing the behavior if we can make it better. The typical use case is to start typing, with the results narrowing as you type. What is your use case where you would like different behavior? |
I have some Rust types like I dont know if this is clear or not. Maybe my workflow is just completely wrong but this is how I do it now. |
I have been thinking and I think substring matching would be the best solution for my use case. E.g. I type in the search box |
I can see a 'contains' search being very useful. (You can get that now, albeit clunkier, by hitting the browse button and typing in the tree's filter.) The 'starts with' lookup allows us to perform very fast searches. Switching to a contains could be much slower if the universe of data types in the tool is large. I will explore ways to toggle between both modes. |
Ah okay. I didnt know it behaves differently when I click on Browse. It is good enough for me, thanks. |
Describe the bug
Seems like the data type search is only triggered when the cursor is at the end of the search string. More precisely, it searches for the string located before the cursor. E.g. if
int
is in the search box and the cursor is betweenin
andt
then it looks for matches containingin
. This behavior is annoying when I modify a longer string multiple times and need to move the cursor to the end to trigger the search each time. Maybe this is intentional but I have never seen a search box behave like this.To Reproduce
See above.
Expected behavior
The position of the cursor is ignored while searching for strings.
Screenshots
See above.
Attachments
N/A
Environment (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: