@@ -25,6 +25,10 @@ public class Main : IAsyncPlugin, ISettingProvider, IPluginI18n, ISavable, IResu
2525 internal static string DefaultImagesDirectory ;
2626 internal static string CustomImagesDirectory ;
2727
28+ private readonly int scoreStandard = 50 ;
29+
30+ private readonly int scoreSuggestions = 48 ;
31+
2832 private readonly string SearchSourceGlobalPluginWildCardSign = "*" ;
2933
3034 public void Save ( )
@@ -49,13 +53,17 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
4953 var title = keyword ;
5054 string subtitle = _context . API . GetTranslation ( "flowlauncher_plugin_websearch_search" ) + " " + searchSource . Title ;
5155
56+ //Action Keyword match apear on top
57+ var score = searchSource . ActionKeyword == SearchSourceGlobalPluginWildCardSign ? scoreStandard : scoreStandard + 1 ;
58+
5259 if ( string . IsNullOrEmpty ( keyword ) )
5360 {
5461 var result = new Result
5562 {
5663 Title = subtitle ,
5764 SubTitle = string . Empty ,
58- IcoPath = searchSource . IconPath
65+ IcoPath = searchSource . IconPath ,
66+ Score = score
5967 } ;
6068 results . Add ( result ) ;
6169 }
@@ -65,9 +73,9 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
6573 {
6674 Title = title ,
6775 SubTitle = subtitle ,
68- Score = 6 ,
6976 IcoPath = searchSource . IconPath ,
7077 ActionKeywordAssigned = searchSource . ActionKeyword == SearchSourceGlobalPluginWildCardSign ? string . Empty : searchSource . ActionKeyword ,
78+ Score = score ,
7179 Action = c =>
7280 {
7381 if ( _settings . OpenInNewBrowser )
@@ -123,6 +131,9 @@ private async Task<IEnumerable<Result>> SuggestionsAsync(string keyword, string
123131 var source = _settings . SelectedSuggestion ;
124132 if ( source != null )
125133 {
134+ //Suggestions appear below actual result, and appear above global action keyword match if non-global;
135+ var score = searchSource . ActionKeyword == SearchSourceGlobalPluginWildCardSign ? scoreSuggestions : scoreSuggestions + 1 ;
136+
126137 var suggestions = await source . Suggestions ( keyword , token ) . ConfigureAwait ( false ) ;
127138
128139 token . ThrowIfCancellationRequested ( ) ;
@@ -131,7 +142,7 @@ private async Task<IEnumerable<Result>> SuggestionsAsync(string keyword, string
131142 {
132143 Title = o ,
133144 SubTitle = subtitle ,
134- Score = 5 ,
145+ Score = score ,
135146 IcoPath = searchSource . IconPath ,
136147 ActionKeywordAssigned = searchSource . ActionKeyword == SearchSourceGlobalPluginWildCardSign ? string . Empty : searchSource . ActionKeyword ,
137148 Action = c =>
0 commit comments