|
50 | 50 | ;; \___/
|
51 | 51 | ;;
|
52 | 52 | ;; The recording of a repeat is started in one of two cases: Either a
|
53 |
| -;; command is about being executed (in pre-command-hook) or normal |
| 53 | +;; command is about to be executed (in pre-command-hook) or normal |
54 | 54 | ;; state is exited. The recording is stopped whenever a command has
|
55 |
| -;; being completed and evil is in normal state afterwards. Therefore, |
| 55 | +;; been completed and evil is in normal state afterwards. Therefore, |
56 | 56 | ;; a non-inserting command in normal-state is recorded as a single
|
57 | 57 | ;; repeat unit. In contrast, if the command leaves normal state and
|
58 | 58 | ;; starts insert-state, all commands that are executed until
|
|
63 | 63 | ;;
|
64 | 64 | ;; Not all commands are recorded. There are several commands that are
|
65 | 65 | ;; completely ignored and other commands that even abort the currently
|
66 |
| -;; active recording, e.g., commands that change the current buffer. |
| 66 | +;; active recording, e.g., commands that switch buffer. |
67 | 67 | ;;
|
68 | 68 | ;; During recording the repeat information is appended to the variable
|
69 | 69 | ;; `evil-repeat-info', which is cleared when the recording
|
@@ -399,8 +399,8 @@ If CHANGE is specified, it is added to `evil-repeat-changes'."
|
399 | 399 |
|
400 | 400 | (defun evil-repeat-insert-at-point (flag)
|
401 | 401 | "Repeation recording function for commands that insert text in region.
|
402 |
| -This records text insertion when a command inserts some text in a |
403 |
| -buffer between (point) and (mark)." |
| 402 | +For example `mouse-yank-primary'. This records text insertion when a command |
| 403 | +inserts some text in a buffer between (point) and (mark)." |
404 | 404 | (cond
|
405 | 405 | ((eq flag 'pre)
|
406 | 406 | (add-hook 'after-change-functions #'evil-repeat-insert-at-point-hook nil t))
|
@@ -580,7 +580,9 @@ If SAVE-POINT is non-nil, do not move point."
|
580 | 580 | (evil-execute-repeat-info-with-count
|
581 | 581 | count (ring-ref evil-repeat-ring 0))
|
582 | 582 | (setq evil-last-find evil-last-find-temp)))
|
583 |
| - (evil-normal-state))))) |
| 583 | + (if (eq 'evil-execute-in-normal-state last-command) |
| 584 | + (evil-change-state evil--execute-normal-return-state) |
| 585 | + (evil-normal-state)))))) |
584 | 586 |
|
585 | 587 | ;; TODO: the same issue concering disabled undos as for `evil-paste-pop'
|
586 | 588 | (evil-define-command evil-repeat-pop (count &optional save-point)
|
|
0 commit comments