From 4a8dd263afab4618e3c5884fff572e08b5cc3d38 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 23 Mar 2026 22:29:24 +1100 Subject: [PATCH 1/3] fix last opened result not showing in 'Empty Last Query' mode --- Flow.Launcher/ViewModel/MainViewModel.cs | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 333ac3652f4..22479e343ce 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -515,8 +515,11 @@ private async Task OpenResultAsync(string index) return; } + var hideWindow = false; + var isDialogJumpLeftClick = _isDialogJump && Settings.DialogJumpResultBehaviour == DialogJumpResultBehaviours.LeftClick; + // For Dialog Jump and left click mode, we need to navigate to the path - if (_isDialogJump && Settings.DialogJumpResultBehaviour == DialogJumpResultBehaviours.LeftClick) + if (isDialogJumpLeftClick) { if (result is DialogJumpResult dialogJumpResult) { @@ -531,26 +534,30 @@ private async Task OpenResultAsync(string index) // For query mode, we execute the result else { - var hideWindow = await result.ExecuteAsync(new ActionContext + hideWindow = await result.ExecuteAsync(new ActionContext { // not null means pressing modifier key + number, should ignore the modifier key SpecialKeyState = index is not null ? SpecialKeyState.Default : GlobalHotkey.CheckModifiers() }).ConfigureAwait(false); - - if (hideWindow) - { - Hide(); - } } - // 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 + // New history result must be recorded before Hide() is called, otherwise when in 'Empty Last Query' query style mode + // the QueryAsync call will reconstuct the result list without the new item. + // Also, add item to history only if it is from results but not context menu or history. if (queryResultsSelected) { _history.Add(result); lastHistoryIndex = 1; } + + // Only hide for query results (not Dialog Jump) + if (!isDialogJumpLeftClick && hideWindow) + { + Hide(); + } + + // Record user selected result for result ranking + _userSelectedRecord.Add(result); } private static IReadOnlyList DeepCloneResults(IReadOnlyList results, bool isDialogJump, CancellationToken token = default) From 2a4748470c8464a7875decf152eac5d7606bde29 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 24 Mar 2026 21:00:33 +1100 Subject: [PATCH 2/3] fix typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 22479e343ce..2c3ee3a154a 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -542,7 +542,7 @@ private async Task OpenResultAsync(string index) } // New history result must be recorded before Hide() is called, otherwise when in 'Empty Last Query' query style mode - // the QueryAsync call will reconstuct the result list without the new item. + // the QueryAsync call will reconstruct the result list without the new item. // Also, add item to history only if it is from results but not context menu or history. if (queryResultsSelected) { From 654026e66308bf833b0a152abc0ebe3527f963c7 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 24 Mar 2026 21:02:18 +1100 Subject: [PATCH 3/3] fix comment --- Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 2c3ee3a154a..6a4d54f27ab 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -550,7 +550,7 @@ private async Task OpenResultAsync(string index) lastHistoryIndex = 1; } - // Only hide for query results (not Dialog Jump) + // Only hide for query results (not Dialog Jump left-click mode) if (!isDialogJumpLeftClick && hideWindow) { Hide();