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.

  • Participants
  • Parent commits d2ba9a1
  • Branches default

Comments (0)

Files changed (1)

File vim-insert-mode.el

 (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