diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 7524d6c1a79..67bb851e8df 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -497,6 +497,21 @@ public bool ShowAtTopmost
}
}
+ private bool _autoTopmostLastOpenedResults = false;
+ public bool AutoTopmostLastOpenedResult
+ {
+ get => _autoTopmostLastOpenedResults;
+ set
+ {
+ if (_autoTopmostLastOpenedResults != value)
+ {
+ _autoTopmostLastOpenedResults = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
+
public bool SearchQueryResultsWithDelay { get; set; }
public int SearchDelayTime { get; set; } = 150;
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 145e1883dd0..db91faa274a 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -179,6 +179,8 @@
This can only be edited if plugin supports Home feature and Home Page is enabled.
Show Search Window at Foremost
Overrides other programs' 'Always on Top' setting and displays Flow in the foremost position.
+ Auto Topmost Results
+ Automatically mark selected results as topmost in their queries for faster access in future searches.
Restart after modifying plugin via Plugin Store
Restart Flow Launcher automatically after installing/uninstalling/updating plugin via Plugin Store
Show unknown source warning
diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
index b4c94cb354b..7049b5304be 100644
--- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
+++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
@@ -106,6 +106,20 @@
OnContent="{DynamicResource enable}" />
+
+
+
+
+
+
+
+
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index ba170feb0be..6fa4b7e907e 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -544,12 +544,14 @@ private async Task OpenResultAsync(string index)
// Record user selected result for result ranking
_userSelectedRecord.Add(result);
- // Add item to history only if it is from results but not context menu or history
+ // Add item to history and topmost only if it is from results but not context menu or history
if (queryResultsSelected)
{
_history.Add(result);
lastHistoryIndex = 1;
- }
+ if (Settings.AutoTopmostLastOpenedResult)
+ _topMostRecord.AddOrUpdate(result);
+ }
}
private static IReadOnlyList DeepCloneResults(IReadOnlyList results, bool isDialogJump, CancellationToken token = default)