1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 05:34:14 +01:00

Fix hint key processing.

This commit is contained in:
Kris Maglione
2011-01-19 23:09:29 -05:00
parent 28639ad25e
commit 8142d837c1
3 changed files with 9 additions and 8 deletions

View File

@@ -967,17 +967,14 @@ var Events = Module("events", {
}
}
let refeed, ownsBuffer = 0, buffer, waiting = 0;
let refeed, buffer, waiting = 0;
for (let input in values(processors)) {
var res = input.process(event);
ownsBuffer += !!input.main.ownsBuffer;
waiting += res == Events.WAIT;
buffer = buffer || input.inputBuffer;
if (isArray(res) && !waiting)
refeed = res;
else if (res !== Events.PASS)
refeed = null;
if (res === Events.KILL)
break;
}
@@ -990,7 +987,7 @@ var Events = Module("events", {
res = dactyl.trapErrors(input.fallthrough, input, event);
}
if (!ownsBuffer)
if (!keyModes.some(function (m) m.ownsBuffer))
statusline.updateInputBuffer(buffer);
if (waiting)
@@ -998,6 +995,9 @@ var Events = Module("events", {
else if (res === Events.KILL && (mode.main & (modes.TEXT_EDIT | modes.VISUAL)))
dactyl.beep();
if (res !== Events.PASS && !isArray(res))
refeed = null;
if (refeed && refeed[0] && (!refeed[0].getPreventDefault() || refeed[0].dactylDefaultPrevented)) {
res = Events.PASS;
refeed.shift();