diff --git a/content/buffer.js b/content/buffer.js index 7082bce2..3f2ee3e6 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -467,6 +467,14 @@ liberator.Buffer = function () //{{{ var modes = liberator.config.browserModes || [liberator.modes.NORMAL]; + liberator.mappings.add(modes, ["."], + "Repeat the last key event", + function () + { + if (liberator.mappings.repeat) + liberator.mappings.repeat(); + }); + liberator.mappings.add(modes, ["i", ""], "Start caret mode", function () diff --git a/content/mappings.js b/content/mappings.js index bdfe469a..87295601 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -65,6 +65,10 @@ liberator.Map.prototype = { if (this.flags & liberator.Mappings.flags.ARGUMENT) args.push(argument); + let self = this; + // FIXME: Kludge. + if (this.names[0] != ".") + liberator.mappings.repeat = function () self.action.apply(self, args); return this.action.apply(this, args); }