From 2d73f80781b96c26338b155effcdc886871f0df0 Mon Sep 17 00:00:00 2001 From: sakurawald Date: Tue, 10 Dec 2024 11:33:39 +0800 Subject: [PATCH] fix: the self-insert command in vi-mode should not insert un-printable char while flushing the pending-keys --- extensions/vi-mode/vi-mode.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/vi-mode/vi-mode.lisp b/extensions/vi-mode/vi-mode.lisp index 591c55370..928f5ac6e 100644 --- a/extensions/vi-mode/vi-mode.lisp +++ b/extensions/vi-mode/vi-mode.lisp @@ -77,7 +77,10 @@ (when (and (typep command 'self-insert) pending-keys) - (dolist (key pending-keys) (self-insert 1 (key-to-char key)))) + (loop :for key :in pending-keys + :until (named-key-sym-p (key-sym key)) + :do + (self-insert 1 (key-to-char key)))) (when *enable-repeat-recording* (unless (or (and (typep command 'vi-command)