diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2024-06-16 16:13:28 +0200 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2024-06-16 16:23:03 +0200 |
| commit | e72562f0fa0256eb0868eaba271db31d602b91ee (patch) | |
| tree | d16bff55dcd44c66e2bb6a77dab8a750b7811f94 /evil-commands.el | |
| parent | f29ad3c91e06ca1910f326b3b0a41ae59ba2c8b6 (diff) | |
Record search offset for repeat
Fixes #1907
Diffstat (limited to 'evil-commands.el')
| -rw-r--r-- | evil-commands.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/evil-commands.el b/evil-commands.el index 43030c2..e4fe002 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -3800,12 +3800,15 @@ after executing the command." (evil-repeat-record (this-command-keys)) (evil-clear-command-keys)) ((and (evil-operator-state-p) (eq flag 'post)) - (evil-repeat-record (evil-ex-pattern-regex evil-ex-search-pattern)) + (let ((search-separator (car (last evil-repeat-info)))) + (evil-repeat-record (evil-ex-pattern-regex evil-ex-search-pattern)) + (when evil-ex-search-offset + (evil-repeat-record (concat search-separator evil-ex-search-offset)))) ;; If it weren't for the fact that `exit-minibuffer' throws an `exit' ;; tag, which bypasses the source of `this-command-keys', we'd be able ;; to capture the key(s) in the post-command of the operator as usual. ;; Fortunately however, `last-input-event' can see the key (by default, `return') - (when (= (length (this-command-keys)) 0) + (when (zerop (length (this-command-keys))) (evil-repeat-record (vector last-input-event)))) (t (evil-repeat-motion flag)))) |
