-
-
Notifications
You must be signed in to change notification settings - Fork 455
Global TAB complete #850
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
Global TAB complete #850
Conversation
|
Maybe we can add setting to allow the user to change hotkeys? I feel Tab is most natural as default however. |
yeah, I think we should. However, it seems a little strange to provide only this function with a key change. For now, it would be good to proceed with tab, and work on that part in another pr later. |
Text cursor should be moving when Tab is used. Is it not working on your end? |
Use suggestion text if available
|
Replacing Query with Above all else we use the Custom suggestion field: |
Flow.Launcher.Plugin/Result.cs
Outdated
| /// </summary> | ||
| public string ActionKeywordAssigned { get; set; } | ||
|
|
||
| public string SuggestionText { get; set; } = string.Empty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to change this to 'AutoCompleteText' to be more specific? I didnt get what it is for on first glance until i read the code.
This is good btw, it will allow plugins to do their own autocomplete, as @onesounds have indicated, if we change how Explorer display Title and Subtitle result, this will allow Explorer to put its own autocompelete text
| string _suggestion = queryText + selectedResultPossibleSuggestion.Substring(queryText.Length); | ||
| if (String.IsNullOrEmpty(selectedResult.SuggestionText)) | ||
| { | ||
| selectedItem.Result.SuggestionText = _suggestion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taooceros will this modifying result cause results comparison issue afterwards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using Result's initialised field to hold the new constructed suggestion string, use ResultViewModel instead. As a general rule we dont want to modify an object after it is constructed, otherwise it's hard to reason what state/information the object has.
jjw24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just some small tweaks
Co-authored-by: Jeremy Wu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Garulf ready to go, just made some minor tweaks, please test it, and if it's good then merge it in.
|
Looks good to me. 👍 |
Pressing Tab will replace the current Query with the selected result's
Title.2021-12-03.10-37-15.mp4
Todo:
Cycle to next result if query matches result(Feels weird and unnatural and doesn't work very well)