mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 16:24:12 +01:00
Zoom value constraints are silly.
This commit is contained in:
@@ -349,7 +349,7 @@ variable.none = No variables found
|
||||
window.cantAttachSame = Can't reattach to the same window
|
||||
window.noIndex-1 = Window %S does not exist
|
||||
|
||||
zoom.outOfRange-2 = Zoom value out of range (%S - %S%%)
|
||||
# zoom.outOfRange-2 = Zoom value out of range (%S - %S%%)
|
||||
zoom.illegal = Illegal zoom value
|
||||
|
||||
error.clipboardEmpty = No clipboard data
|
||||
|
||||
@@ -1102,9 +1102,6 @@ var Buffer = Module("Buffer", {
|
||||
let { dactyl, statusline } = this.modules;
|
||||
let { ZoomManager } = this;
|
||||
|
||||
util.assert(value >= Buffer.ZOOM_MIN || value <= Buffer.ZOOM_MAX,
|
||||
_("zoom.outOfRange", Buffer.ZOOM_MIN, Buffer.ZOOM_MAX));
|
||||
|
||||
if (fullZoom === undefined)
|
||||
fullZoom = ZoomManager.useFullZoom;
|
||||
else
|
||||
@@ -1761,10 +1758,8 @@ var Buffer = Module("Buffer", {
|
||||
level = 100;
|
||||
else if (/^\d+$/.test(arg))
|
||||
level = parseInt(arg, 10);
|
||||
else if (/^[+-]\d+$/.test(arg)) {
|
||||
else if (/^[+-]\d+$/.test(arg))
|
||||
level = Math.round(buffer.zoomLevel + parseInt(arg, 10));
|
||||
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
|
||||
}
|
||||
else
|
||||
dactyl.assert(false, _("error.trailingCharacters"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user