1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 16:47:59 +01:00

Fix :zoom with a relative argument.

This commit is contained in:
Doug Kearns
2010-10-21 17:49:06 +11:00
parent 8e827b053d
commit 4c90f72617

View File

@@ -1380,7 +1380,7 @@ const Buffer = Module("buffer", {
else if (/^\d+$/.test(arg))
level = parseInt(arg, 10);
else if (/^[+-]\d+$/.test(arg)) {
level = this.zoomLevel + parseInt(arg, 10);
level = buffer.zoomLevel + parseInt(arg, 10);
// relative args shouldn't take us out of range
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
}