Skip to content

Commit

Permalink
Merge pull request #1102 from fukamachi/fix/vi-kbdmacro-error
Browse files Browse the repository at this point in the history
Fix vi-mode's keyboard macro in case that the recording is accidentally stopped
  • Loading branch information
cxxxr authored Sep 22, 2023
2 parents 68823d6 + 05b1202 commit 0c66311
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extensions/vi-mode/commands.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,14 @@
(t
(lem-core:key-to-char key)))))

(define-command vi-record-macro (register) ((or *kbdmacro-recording-register*
(define-command vi-record-macro (register) ((if (key-recording-p)
*kbdmacro-recording-register*
(read-register)))
(cond
((macro-register-p register)
(cond
;; When recording
(*kbdmacro-recording-register*
((key-recording-p)
;; Finish recording
(lem/kbdmacro:kbdmacro-end)
(setf (register register)
Expand Down

0 comments on commit 0c66311

Please sign in to comment.