branch: elpa/evil-emacs-cursor-model-mode
commit 13d9754f7aaf3af95458ad9b79ae996845b739e7
Author: maxfriis <[email protected]>
Commit: GitHub <[email protected]>
Make evil-last-find the right value after find/to
Used to signal that the last find/to was backwards if finding the
char-after with no prefix.
---
evil-emacs-cursor-model-mode.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/evil-emacs-cursor-model-mode.el b/evil-emacs-cursor-model-mode.el
index e9f62ba58c..3b4d9f20e1 100644
--- a/evil-emacs-cursor-model-mode.el
+++ b/evil-emacs-cursor-model-mode.el
@@ -151,9 +151,9 @@ Movement is restricted to the current line unless
`evil-cross-lines' is non-nil.
(unless count (setq count 1))
(cond
((> count 0)
- (when (= (char-after) char)
- (cl-decf count))
- (evil-find-char count char))
+ (if (= (char-after) char)
+ (evil-find-char (1- count) char)
+ (evil-find-char count char)))
((< count 0)
(evil-find-char-to-backward (- count) char)))
(setq evil-last-find (list #'evil-emacs-cursor-model-find-before-char char
(> count 0))))
@@ -166,9 +166,9 @@ Movement is restricted to the current line unless
`evil-cross-lines' is non-nil.
(unless count (setq count 1))
(cond
((> count 0)
- (when (= (char-after) char)
- (cl-decf count))
- (evil-find-char count char)
+ (if (= (char-after) char)
+ (evil-find-char (1- count) char)
+ (evil-find-char count char))
(forward-char))
((< count 0)
(evil-find-char-backward (- count) char)))