From 8b33ca9a416693899e2ae0d7b1929e10603236c9 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 4 Dec 2021 20:34:40 -0500 Subject: [PATCH] Use text path --- .../Converters/QuerySuggestionBoxConverter.cs | 10 ++++------ Flow.Launcher/MainWindow.xaml | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs index e68098c49..d6b0c12d7 100644 --- a/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs +++ b/Flow.Launcher/Converters/QuerySuggestionBoxConverter.cs @@ -11,15 +11,13 @@ namespace Flow.Launcher.Converters { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { - if (values.Length != 2) + if (values.Length != 3) { return string.Empty; } - var QueryText = values[0] as TextBox; + var QueryTextBox = values[0] as TextBox; - - - var queryText = QueryText.Text; + var queryText = (string)values[2]; if (string.IsNullOrEmpty(queryText)) return string.Empty; @@ -43,7 +41,7 @@ namespace Flow.Launcher.Converters var selectedResultActionKeyword = string.IsNullOrEmpty(selectedResult.ActionKeywordAssigned) ? "" : selectedResult.ActionKeywordAssigned + " "; var selectedResultPossibleSuggestion = selectedResultActionKeyword + selectedResult.Title; - if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase) || QueryText.HorizontalOffset != 0) + if (!selectedResultPossibleSuggestion.StartsWith(queryText, StringComparison.CurrentCultureIgnoreCase) || QueryTextBox.HorizontalOffset != 0) return string.Empty; // When user typed lower case and result title is uppercase, we still want to display suggestion diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 29df0f9ae..acfa96406 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -161,7 +161,7 @@ Style="{DynamicResource QuerySuggestionBoxStyle}"> - +