Skip to content

Commit 324c431

Browse files
committed
add slight delay to fix re-querying after closing tab
1 parent dd4d737 commit 324c431

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
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();

0 commit comments

Comments
 (0)