mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-31 19:23:32 +02: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.cantAttachSame = Can't reattach to the same window
|
||||||
window.noIndex-1 = Window %S does not exist
|
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
|
zoom.illegal = Illegal zoom value
|
||||||
|
|
||||||
error.clipboardEmpty = No clipboard data
|
error.clipboardEmpty = No clipboard data
|
||||||
|
|||||||
@@ -1102,9 +1102,6 @@ var Buffer = Module("Buffer", {
|
|||||||
let { dactyl, statusline } = this.modules;
|
let { dactyl, statusline } = this.modules;
|
||||||
let { ZoomManager } = this;
|
let { ZoomManager } = this;
|
||||||
|
|
||||||
util.assert(value >= Buffer.ZOOM_MIN || value <= Buffer.ZOOM_MAX,
|
|
||||||
_("zoom.outOfRange", Buffer.ZOOM_MIN, Buffer.ZOOM_MAX));
|
|
||||||
|
|
||||||
if (fullZoom === undefined)
|
if (fullZoom === undefined)
|
||||||
fullZoom = ZoomManager.useFullZoom;
|
fullZoom = ZoomManager.useFullZoom;
|
||||||
else
|
else
|
||||||
@@ -1761,10 +1758,8 @@ var Buffer = Module("Buffer", {
|
|||||||
level = 100;
|
level = 100;
|
||||||
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 = Math.round(buffer.zoomLevel + parseInt(arg, 10));
|
level = Math.round(buffer.zoomLevel + parseInt(arg, 10));
|
||||||
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
dactyl.assert(false, _("error.trailingCharacters"));
|
dactyl.assert(false, _("error.trailingCharacters"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user