mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 23:27:59 +01:00
Wait for completion to finish before processing <Tab>
This commit is contained in:
@@ -363,12 +363,14 @@ function CommandLine() //{{{
|
|||||||
if (this.context.waitingForTab || this.wildIndex == -1)
|
if (this.context.waitingForTab || this.wildIndex == -1)
|
||||||
this.complete(true, true);
|
this.complete(true, true);
|
||||||
|
|
||||||
if (this.items.length == 0)
|
// Would prefer to only do this check when no completion
|
||||||
|
// is available, but there are complications.
|
||||||
|
if (this.items.length == 0 || this.context.incomplete)
|
||||||
{
|
{
|
||||||
// No items. Wait for any unfinished completers.
|
// No items. Wait for any unfinished completers.
|
||||||
let end = Date.now() + 5000;
|
let end = Date.now() + 5000;
|
||||||
while (this.context.incomplete && this.items.length == 0 && Date.now() < end)
|
while (this.context.incomplete && /* this.items.length == 0 && */ Date.now() < end)
|
||||||
liberator.threadYield();
|
liberator.threadYield(true, true);
|
||||||
|
|
||||||
if (this.items.length == 0)
|
if (this.items.length == 0)
|
||||||
return liberator.beep();
|
return liberator.beep();
|
||||||
|
|||||||
Reference in New Issue
Block a user