From bf44637400f9551758754f3cd71edf8a8e55df5a Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 20 Jan 2026 23:18:00 +1100 Subject: [PATCH] revert context menu early exit when history result --- Flow.Launcher/ViewModel/MainViewModel.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index f6e289a31..f93aef5a6 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -429,17 +429,16 @@ namespace Flow.Launcher.ViewModel return; } - // Do not show context menu for history results, they will have no PluginID set. - if (string.IsNullOrEmpty(SelectedResults.SelectedItem?.Result?.PluginID)) - return; - // For query mode, we load context menu if (QueryResultsSelected()) { // When switch to ContextMenu from QueryResults, but no item being chosen, should do nothing // i.e. Shift+Enter/Ctrl+O right after Alt + Space should do nothing - if (SelectedResults.SelectedItem?.Result != null) + if (SelectedResults.SelectedItem?.Result != null && + !string.IsNullOrEmpty(SelectedResults.SelectedItem.Result.PluginID)) // Do not show context menu for history results + { SelectedResults = ContextMenu; + } } else { @@ -1261,7 +1260,8 @@ namespace Flow.Launcher.ViewModel var selected = Results.SelectedItem?.Result; - if (selected != null) // SelectedItem returns null if selection is empty. + if (selected != null && // SelectedItem returns null if selection is empty. + !string.IsNullOrEmpty(selected.PluginID)) // SelectedItem must have a valid PluginID, history results do not. { List results = PluginManager.GetContextMenusForPlugin(selected); results.Add(ContextMenuTopMost(selected));