// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2012 Kris Maglione <maglione.k at Gmail>
+// Copyright (c) 2008-2013 Kris Maglione <maglione.k at Gmail>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
{ configurable: true, enumerable: true, get: function () opt.default };
if (prop.get && !prop.set)
- prop.set = function (val) { Class.replaceProperty(this, opt.names[0], val) };
+ prop.set = function (val) { Class.replaceProperty(this, opt.names[0], val); };
Object.defineProperty(res, opt.names[0], prop);
}
});
if (this.cached)
this.modules.initDependencies("commands");
this.cached = false;
- return array.iterValues(this._list.sort(function (a, b) a.name > b.name))
+ return array.iterValues(this._list.sort(function (a, b) a.name > b.name));
},
/** @property {string} The last executed Ex command line. */
this.remove(name);
}
- let self = this;
- let closure = function () self._map[name];
+ let closure = () => this._map[name];
memoize(this._map, name, function () commands.Command(specs, description, action, extra));
if (!extra.hidden)
if (sub.substr(0, 2) === "<<" && hereDoc)
let ([count, arg] = getNextArg(sub)) {
sub = arg + sub.substr(count);
- }
+ };
args.push(sub);
args.quote = null;
return dactyl.userEval(completer);
});
if (callable(result))
- return result.apply(this, Array.slice(arguments));
+ return result.apply(this, arguments);
else
return context.completions = result;
};
mappings.add([modes.COMMAND],
["@:"], "Repeat the last Ex command",
- function (args) {
+ function ({ count }) {
if (commands.repeat) {
- for (let i in util.interruptibleRange(0, Math.max(args.count, 1), 100))
+ for (let i in util.interruptibleRange(0, Math.max(count, 1), 100))
dactyl.execute(commands.repeat);
}
else
Commands.quoteMap = {
"\n": "\\n",
- "\t": "\\t",
+ "\t": "\\t"
};
Commands.quoteArg = {
} catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
-// vim: set fdm=marker sw=4 ts=4 et ft=javascript:
+// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: