diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs
index a459e9ee6..b9f3ba45b 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -257,6 +257,12 @@ namespace Flow.Launcher.Plugin
///
public bool ShowBadge { get; set; } = false;
+ ///
+ /// This holds the text which can be shown as a query suggestion.
+ ///
+ /// When a value is not set, the will be used.
+ public string QuerySuggestionText { get; set; }
+
///
/// Run this result, asynchronously
///
diff --git a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
index eb492e334..270dac4dc 100644
--- a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
+++ b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs
@@ -33,15 +33,17 @@ public class QuerySuggestionBoxConverter : IMultiValueConverter
{
var selectedResult = selectedItem.Result;
var selectedResultActionKeyword = string.IsNullOrEmpty(selectedResult.ActionKeywordAssigned) ? "" : selectedResult.ActionKeywordAssigned + " ";
- var selectedResultPossibleSuggestion = selectedResultActionKeyword + selectedResult.Title;
+ var selectedResultPossibleSuggestion = selectedResultActionKeyword +
+ (string.IsNullOrEmpty(selectedResult.QuerySuggestionText) ?
+ selectedResult.Title :
+ selectedResult.QuerySuggestionText);
if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase))
return string.Empty;
-
// For AutocompleteQueryCommand.
// When user typed lower case and result title is uppercase, we still want to display suggestion
- selectedItem.QuerySuggestionText = queryText + selectedResultPossibleSuggestion.Substring(queryText.Length);
+ selectedItem.QuerySuggestionText = string.Concat(queryText, selectedResultPossibleSuggestion.AsSpan(queryText.Length));
// Check if Text will be larger than our QueryTextBox
Typeface typeface = new Typeface(queryTextBox.FontFamily, queryTextBox.FontStyle, queryTextBox.FontWeight, queryTextBox.FontStretch);