diff --git a/Main.cs b/Main.cs index 8fe31ae..fdc6f01 100644 --- a/Main.cs +++ b/Main.cs @@ -44,8 +44,9 @@ public Task> QueryAsync(Query query, CancellationToken token) if (c.SpecialKeyState.CtrlPressed) { tab.CloseTab(); - // Re-query to remove closed tab from the results - Context.API.ChangeQuery(query.RawQuery, true); + // Re-query to remove closed tab from the results. + // Add a slight delay so re-query can pick up the tab elements again, 200ms was the right amount after testing + Task.Delay(200).ContinueWith(_ => Context.API.ChangeQuery(query.RawQuery, requery: true)); } else tab.ActivateTab(); diff --git a/plugin.json b/plugin.json index 4dc0803..ff27a69 100644 --- a/plugin.json +++ b/plugin.json @@ -4,7 +4,7 @@ "Name": "Browser Tabs", "Description": "Search, activate, or close browser tabs. A centralized plugin for managing all open tabs in your browser", "Author": "Jeremy Wu", - "Version": "1.0.0", + "Version": "1.0.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher.Plugin.BrowserTabs", "ExecuteFileName": "Flow.Launcher.Plugin.BrowserTabs.dll",