branch: elpa/evil commit 9c6b5f188ffd5025a234e1185baf630700b6ffd7 Author: Tom Dalziel <tom...@hotmail.com> Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>
Enable moving from point-min for next flyspell error Fixes #1133 --- evil-commands.el | 8 +++----- evil-tests.el | 12 +++++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/evil-commands.el b/evil-commands.el index 4e6109abef..9ae1c2062f 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -618,11 +618,9 @@ and jump to the corresponding one." limit ov) (when (evil--flyspell-overlay-at pos forwardp) - (if (/= pos (point-min)) - (setq pos (save-excursion (goto-char pos) - (forward-word (if forwardp 1 -1)) - (point))) - (setq pos (point-max)))) + (setq pos (save-excursion (goto-char pos) + (forward-word (if forwardp 1 -1)) + (point)))) (setq limit (if forwardp (point-max) (point-min)) ov (evil--flyspell-overlay-after pos limit forwardp)) (if ov diff --git a/evil-tests.el b/evil-tests.el index f9bc6ec2ec..91492f049c 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -5850,7 +5850,17 @@ Line 2")) ("[s") "I cannt tpye for [l]yfe" ("[s") - "I cannt [t]pye for lyfe")) + "I cannt [t]pye for lyfe") + (evil-test-buffer + "[o]en otw thre" + (flyspell-mode) + (flyspell-buffer) + ("]s") + "oen [o]tw thre" + ("]s") + "oen otw [t]hre" + ("]s") + "[o]en otw thre")) (ert-info ("With count") (evil-test-buffer "[I] cannt tpye for lyfe"