mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 09:57:59 +01:00
Fix :zoom with a relative argument.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user