1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 08:07:59 +01:00

Fix zz, zZ, and :zoom {val}, and also spurious ZZ help tag. Closes issue #39.

This commit is contained in:
Kris Maglione
2010-10-04 23:02:02 -04:00
parent 9af8705807
commit d07b7c8c52
2 changed files with 5 additions and 9 deletions

View File

@@ -1402,11 +1402,7 @@ const Buffer = Module("buffer", {
else if (/^\d+$/.test(arg))
level = parseInt(arg, 10);
else if (/^[+-]\d+$/.test(arg)) {
if (args.bang)
level = buffer.fullZoom + parseInt(arg, 10);
else
level = buffer.textZoom + parseInt(arg, 10);
level = this.zoomLevel + parseInt(arg, 10);
// relative args shouldn't take us out of range
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
}
@@ -1730,7 +1726,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["zz"],
"Set text zoom value of current web page",
function (count) { buffer.textZoom = count > 1 ? count : 100; },
function (count) { Buffer.setZoom(count > 1 ? count : 100, false) },
{ count: true });
mappings.add(myModes, ["ZI", "zI"],
@@ -1755,7 +1751,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["zZ"],
"Set full zoom value of current web page",
function (count) { buffer.fullZoom = count > 1 ? count : 100; },
function (count) { Buffer.setZoom(count > 1 ? count : 100, true) },
{ count: true });
// page info

View File

@@ -439,9 +439,9 @@
</item>
<item>
<tags>ZZ zZ</tags>
<tags>zZ</tags>
<strut/>
<spec><oa>count</oa>ZZ</spec>
<spec><oa>count</oa>zZ</spec>
<description>
<p>
Set full zoom value of current web page. Zoom value can be between 30 and