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.
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.
@taooceros will this modifying result cause results comparison issue afterwards?
There was a problem hiding this comment.
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.
Co-authored-by: Jeremy Wu <jeremy24wu@gmail.com>
|
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)