mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
simplify suggestion's autocomplete logic
This commit is contained in:
parent
e3aa648e88
commit
78dbc0c53d
1 changed files with 4 additions and 6 deletions
|
|
@ -43,13 +43,11 @@ namespace Flow.Launcher.Converters
|
|||
if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase))
|
||||
return string.Empty;
|
||||
|
||||
// construct autocomplete with suggestion
|
||||
string _suggestion = queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
|
||||
if (string.IsNullOrEmpty(selectedResult.AutoCompleteText))
|
||||
selectedItem.QuerySuggestionText = _suggestion;
|
||||
|
||||
// For AutocompleteQueryCommand.
|
||||
// When user typed lower case and result title is uppercase, we still want to display suggestion
|
||||
return queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
|
||||
selectedItem.QuerySuggestionText = queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
|
||||
|
||||
return selectedItem.QuerySuggestionText;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue