mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 01:12:31 +02:00
Fix :zoom with a relative argument.
This commit is contained in:
1 parent
8e827b053d
commit
4c90f72617
1 file changed
+1
-1
@@ -1380,7 +1380,7 @@ const Buffer = Module("buffer", {
|
|||||||
else if (/^\d+$/.test(arg))
|
else if (/^\d+$/.test(arg))
|
||||||
level = parseInt(arg, 10);
|
level = parseInt(arg, 10);
|
||||||
else if (/^[+-]\d+$/.test(arg)) {
|
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
|
// relative args shouldn't take us out of range
|
||||||
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
|
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user