File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 66
66
(fall-within-line (current-point)))
67
67
68
68
(defmethod post-command-hook ((state insert))
69
- (let ((command (this-command)))
69
+ (let* ((command (this-command))
70
+ (this-command-keys (vi-this-command-keys))
71
+ (pending-keys (cdr this-command-keys)))
72
+
73
+ ; ; For the command `self-insert`, the `this-command-keys` is typically only 1 char. (pending-keys = nil)
74
+ ; ; If pending-keys is NOT nil, then these keys are used to disguish the keys between `self-insert` command and other commands.
75
+ ; ; For other commands, we can simply ignore the pending-keys.
76
+ ; ; For self-insert command, we should also flusthese pending-keys.
77
+ (when (and
78
+ (typep command ' self-insert)
79
+ pending-keys)
80
+ (dolist (key pending-keys) (self-insert 1 (key-to-char key))))
81
+
70
82
(when *enable-repeat-recording*
71
83
(unless (or (and (typep command ' vi-command)
72
84
(eq (vi-command-repeat command) nil ))
73
85
(eq (command-name (this-command)) ' vi-end-insert))
74
86
(appendf *last-repeat-keys*
75
- (vi- this-command-keys) ))))
87
+ this-command-keys))))
76
88
(adjust-window-scroll))
77
89
78
90
(defmethod post-command-hook :after ((state visual))
You can’t perform that action at this time.
0 commit comments