mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 04:27:59 +01:00
Fix hint key processing.
This commit is contained in:
@@ -1198,9 +1198,9 @@ var Buffer = Module("buffer", {
|
|||||||
* Adjusts the page zoom of the current buffer relative to the
|
* Adjusts the page zoom of the current buffer relative to the
|
||||||
* current zoom level.
|
* current zoom level.
|
||||||
*
|
*
|
||||||
* @param {number} steps The number of natural fractions by which to
|
* @param {number} steps The integral number of natural fractions by
|
||||||
* adjust the current page zoom. If positive, the zoom level is
|
* which to adjust the current page zoom. If positive, the zoom
|
||||||
* increased, if negative it is decreased.
|
* level is increased, if negative it is decreased.
|
||||||
* @param {boolean} fullZoom If true, zoom all content of the page,
|
* @param {boolean} fullZoom If true, zoom all content of the page,
|
||||||
* including raster images. If false, zoom only text. If omitted,
|
* including raster images. If false, zoom only text. If omitted,
|
||||||
* use the current zoom function. @optional
|
* use the current zoom function. @optional
|
||||||
|
|||||||
@@ -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)) {
|
for (let input in values(processors)) {
|
||||||
var res = input.process(event);
|
var res = input.process(event);
|
||||||
ownsBuffer += !!input.main.ownsBuffer;
|
|
||||||
waiting += res == Events.WAIT;
|
waiting += res == Events.WAIT;
|
||||||
buffer = buffer || input.inputBuffer;
|
buffer = buffer || input.inputBuffer;
|
||||||
|
|
||||||
if (isArray(res) && !waiting)
|
if (isArray(res) && !waiting)
|
||||||
refeed = res;
|
refeed = res;
|
||||||
else if (res !== Events.PASS)
|
|
||||||
refeed = null;
|
|
||||||
if (res === Events.KILL)
|
if (res === Events.KILL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -990,7 +987,7 @@ var Events = Module("events", {
|
|||||||
res = dactyl.trapErrors(input.fallthrough, input, event);
|
res = dactyl.trapErrors(input.fallthrough, input, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ownsBuffer)
|
if (!keyModes.some(function (m) m.ownsBuffer))
|
||||||
statusline.updateInputBuffer(buffer);
|
statusline.updateInputBuffer(buffer);
|
||||||
|
|
||||||
if (waiting)
|
if (waiting)
|
||||||
@@ -998,6 +995,9 @@ var Events = Module("events", {
|
|||||||
else if (res === Events.KILL && (mode.main & (modes.TEXT_EDIT | modes.VISUAL)))
|
else if (res === Events.KILL && (mode.main & (modes.TEXT_EDIT | modes.VISUAL)))
|
||||||
dactyl.beep();
|
dactyl.beep();
|
||||||
|
|
||||||
|
if (res !== Events.PASS && !isArray(res))
|
||||||
|
refeed = null;
|
||||||
|
|
||||||
if (refeed && refeed[0] && (!refeed[0].getPreventDefault() || refeed[0].dactylDefaultPrevented)) {
|
if (refeed && refeed[0] && (!refeed[0].getPreventDefault() || refeed[0].dactylDefaultPrevented)) {
|
||||||
res = Events.PASS;
|
res = Events.PASS;
|
||||||
refeed.shift();
|
refeed.shift();
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ var Modes = Module("modes", {
|
|||||||
|
|
||||||
this.addMode("BASE", {
|
this.addMode("BASE", {
|
||||||
description: "The base mode for all other modes",
|
description: "The base mode for all other modes",
|
||||||
|
bases: [],
|
||||||
count: false
|
count: false
|
||||||
});
|
});
|
||||||
this.addMode("MAIN", {
|
this.addMode("MAIN", {
|
||||||
|
|||||||
Reference in New Issue
Block a user