Skip to content

Commit 058f89f

Browse files
authored
Merge pull request #1 from Flow-Launcher/fix_close_tab_requery
Fix closing tab issue where the tabs are no longer returned
2 parents dd4d737 + 416b665 commit 058f89f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Main.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ public Task<List<Result>> QueryAsync(Query query, CancellationToken token)
4444
if (c.SpecialKeyState.CtrlPressed)
4545
{
4646
tab.CloseTab();
47-
// Re-query to remove closed tab from the results
48-
Context.API.ChangeQuery(query.RawQuery, true);
47+
// Re-query to remove closed tab from the results.
48+
// Add a slight delay so re-query can pick up the tab elements again, 200ms was the right amount after testing
49+
Task.Delay(200).ContinueWith(_ => Context.API.ChangeQuery(query.RawQuery, requery: true));
4950
}
5051
else
5152
tab.ActivateTab();

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "Browser Tabs",
55
"Description": "Search, activate, or close browser tabs. A centralized plugin for managing all open tabs in your browser",
66
"Author": "Jeremy Wu",
7-
"Version": "1.0.0",
7+
"Version": "1.0.1",
88
"Language": "csharp",
99
"Website": "https://github.com/Flow-Launcher/Flow.Launcher.Plugin.BrowserTabs",
1010
"ExecuteFileName": "Flow.Launcher.Plugin.BrowserTabs.dll",

0 commit comments

Comments
 (0)