Frank Fischer avatar Frank Fischer committed bc5ff41

fix: insert-mode does not log bindings to keyboard macros

Insert mode logs all key-sequences for repeating. When a key-sequence
invokes another key-sequence, the invoking key-sequence is *not*
logged because the invoked key-sequence will be logged, too. The old
behavior was to log both which led to duplicate command executions,
one for the first key-binding and one for the binding the first was
mapped to. Now only the final mapping, which should call a certain
function, is logged.

Comments (0)

Files changed (1)


 (defun vim:insert-save-key-sequence ()
   "Called in insert-mode to save key-events."
-  (unless (eq this-command 'vim:intercept-ESC)
+  (when (and (not (eq this-command 'vim:intercept-ESC))
+	     (functionp this-command))
     (setq vim:current-key-sequence (vconcat vim:current-key-sequence
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.