mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-19 07:05:47 +01:00
Fix zoom level display for fractional percentages.
This commit is contained in:
@@ -31,7 +31,7 @@ var AutoCommands = Module("autocommands", {
|
||||
*/
|
||||
add: function (events, regexp, cmd) {
|
||||
events.forEach(function (event) {
|
||||
this._store.push(AutoCommand(event, Option.parse.regexplist(regexp), cmd));
|
||||
this._store.push(AutoCommand(event, Option.parse.regexplist(regexp.source || regexp), cmd));
|
||||
}, this);
|
||||
},
|
||||
|
||||
|
||||
@@ -1181,8 +1181,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
*/
|
||||
reportError: function reportError(error, echo) {
|
||||
if (error instanceof FailedAssertion || error.message === "Interrupted") {
|
||||
let prefix = io.sourcing ? io.sourcing.file + ":" + io.sourcing.line + ": " : "";
|
||||
if (error.message)
|
||||
dactyl.echoerr(template.linkifyHelp(error.message));
|
||||
dactyl.echoerr(template.linkifyHelp(prefix + error.message));
|
||||
else
|
||||
dactyl.beep();
|
||||
return;
|
||||
|
||||
@@ -309,7 +309,7 @@ var StatusLine = Module("statusline", {
|
||||
if (percent == 100)
|
||||
this.widgets.zoomlevel.value = "";
|
||||
else {
|
||||
percent = (" " + percent).substr(-3);
|
||||
percent = (" " + Math.round(percent)).substr(-3);
|
||||
if (full)
|
||||
this.widgets.zoomlevel.value = " [" + percent + "%]";
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user