Skip to content

Instantly share code, notes, and snippets.

@teramako
Created January 11, 2012 00:31
Show Gist options
  • Select an option

  • Save teramako/1592202 to your computer and use it in GitHub Desktop.

Select an option

Save teramako/1592202 to your computer and use it in GitHub Desktop.
2012-01-10のNightlyでVimperatorのコマンドが動かなくなったものへの一時的パッチ(たぶん不完全)
diff -r 482aa8084e0e common/content/commands.js
--- a/common/content/commands.js Tue Jan 10 21:24:47 2012 +0900
+++ b/common/content/commands.js Wed Jan 11 09:30:40 2012 +0900
@@ -44,10 +44,10 @@
throw Error("Invalid command name");
this.specs = specs;
- this.shortNames = array(parsedSpecs).map(function (n) n[1]).compact();
+ this.shortNames = parsedSpecs.reduce(function(r,c){c[1]&&r.push(c[1]);return r;}, []);
this.longNames = parsedSpecs.map(function (n) n[0]);
this.name = this.longNames[0];
- this.names = array(parsedSpecs).flatten();
+ this.names = parsedSpecs.reduce(function(r,c) r.concat(c), []);
this.description = description;
this.action = action;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment