1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:27:58 +01:00

Add template.listCompleter to list completion results to the MOW.

This commit is contained in:
Kris Maglione
2008-11-25 07:30:23 +00:00
parent b543359408
commit 3affc98ea5
10 changed files with 105 additions and 136 deletions

View File

@@ -1249,12 +1249,12 @@ const liberator = (function () //{{{
autocommands.trigger(config.name + "Leave", {});
},
sleep: function (ms)
sleep: function (delay)
{
var mainThread = threadManager.mainThread;
let mainThread = threadManager.mainThread;
var then = new Date().getTime(), now = then;
for (; now - then < ms; now = new Date().getTime())
let end = Date.now() + delay;
while (Date.now() < end)
mainThread.processNextEvent(true);
return true;
},
@@ -1268,11 +1268,16 @@ const liberator = (function () //{{{
callback();
},
threadYield: function (flush)
threadYield: function (flush, interruptable)
{
let mainThread = threadManager.mainThread;
liberator.interrupted = false;
do
{
mainThread.processNextEvent(true);
if (liberator.interrupted)
throw new Error("Interrupted");
}
while (flush && mainThread.hasPendingEvents());
},