1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 08:27:59 +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

@@ -1198,9 +1198,9 @@ var Buffer = Module("buffer", {
* Adjusts the page zoom of the current buffer relative to the
* current zoom level.
*
* @param {number} steps The number of natural fractions by which to
* adjust the current page zoom. If positive, the zoom level is
* increased, if negative it is decreased.
* @param {number} steps The integral number of natural fractions by
* which to adjust the current page zoom. If positive, the zoom
* level is increased, if negative it is decreased.
* @param {boolean} fullZoom If true, zoom all content of the page,
* including raster images. If false, zoom only text. If omitted,
* use the current zoom function. @optional

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();

View File

@@ -37,6 +37,7 @@ var Modes = Module("modes", {
this.addMode("BASE", {
description: "The base mode for all other modes",
bases: [],
count: false
});
this.addMode("MAIN", {