Skip to content

Commit faa5cd1

Browse files
committed
Cache current tab to fix file editor handle issue
1 parent eb1fa18 commit faa5cd1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Flow.Launcher.Infrastructure/QuickSwitch/Models/WindowsDialog.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,18 @@ internal class WindowsDialogWindow : IQuickSwitchDialogWindow
6060
{
6161
public HWND Handle { get; private set; }
6262

63+
// After jumping folder, file editor handle of Save / SaveAs file dialogs cannot be found anymore
64+
// So we need to cache the current tab and use the original handle
65+
private IQuickSwitchDialogWindowTab _currentTab { get; set; } = null;
66+
6367
public WindowsDialogWindow(HWND handle)
6468
{
6569
Handle = handle;
6670
}
6771

6872
public IQuickSwitchDialogWindowTab GetCurrentTab()
6973
{
70-
return new WindowsDialogTab(Handle);
74+
return _currentTab ??= new WindowsDialogTab(Handle);
7175
}
7276

7377
public void Dispose()

0 commit comments

Comments
 (0)