Merge pull request #978 from Flow-Launcher/use_autocomplete_text

Minor enhancements to query auto-completion
This commit is contained in:
Jeremy Wu 2022-01-14 07:52:42 +11:00 committed by GitHub
commit 10b8a35c57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 3 deletions

View file

@ -229,7 +229,7 @@ namespace Flow.Launcher.ViewModel
AutocompleteQueryCommand = new RelayCommand(_ =>
{
var result = SelectedResults.SelectedItem?.Result;
if (result != null) // SelectedItem returns null if selection is empty.
if (result != null && SelectedIsFromQueryResults()) // SelectedItem returns null if selection is empty.
{
var autoCompleteText = result.Title;

View file

@ -25,6 +25,7 @@ namespace Flow.Launcher.Plugin.PluginIndicator
SubTitle = $"Activate {metadata.Name} plugin",
Score = 100,
IcoPath = metadata.IcoPath,
AutoCompleteText = $"{keyword}{Plugin.Query.TermSeparator}",
Action = c =>
{
context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeparator}");

View file

@ -4,7 +4,7 @@
"Name": "Plugin Indicator",
"Description": "Provide plugin actionword suggestion",
"Author": "qianlifeng",
"Version": "1.1.3",
"Version": "1.1.4",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.PluginIndicator.dll",

View file

@ -88,6 +88,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller
TitleHighlightData = StringMatcher.FuzzySearch(termToSearch, p.ProcessName).MatchData,
Score = pr.Score,
ContextData = p.ProcessName,
AutoCompleteText = $"{_context.CurrentPluginMetadata.ActionKeyword}{Plugin.Query.TermSeparator}{p.ProcessName}",
Action = (c) =>
{
processHelper.TryKill(p);

View file

@ -4,7 +4,7 @@
"Name":"Process Killer",
"Description":"Kill running processes from Flow",
"Author":"Flow-Launcher",
"Version":"1.2.4",
"Version":"1.2.5",
"Language":"csharp",
"Website":"https://github.com/Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller",
"IcoPath":"Images\\app.png",