@@ plays last recorded macro if no macro has been played before

7 views
Skip to first unread message

Gordon Gustafson

unread,
Feb 18, 2015, 2:13:52 PM2/18/15
to dactyl-...@googlegroups.com
I'm a mercurial noob, so let me know if I should produce the patch in a different way. :)

> hg log -p -l 1
changeset:   7141:5f4ed810d35a
tag:         tip
user:        Gordon Gustafson <gordo...@gmail.com>
date:        Wed Feb 18 13:01:07 2015 -0500
summary:     @@ plays last recorded macro if no macro has been played before

diff -r 59c43695e9ee -r 5f4ed810d35a common/content/events.js
--- a/common/content/events.js    Wed Jan 14 23:47:36 2015 +1100
+++ b/common/content/events.js    Wed Feb 18 13:01:07 2015 -0500
@@ -263,6 +263,9 @@
         }
         else if (macro) { // Record afresh.
             this._macroKeys = [];
+            // if no macro has been played before, @@ should play the last recorded macro
+            if (this._lastMacro === "")
+                this._lastMacro = macro;
         }
         else if (this.recording) { // Save.
             editor.setRegister(this.recording, this._macroKeys.join(""));


Reply all
Reply to author
Forward
0 new messages