Skip to content

Commit 9c6b5f1

Browse files
committed
Enable moving from point-min for next flyspell error
Fixes #1133
1 parent b47cb64 commit 9c6b5f1

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

evil-commands.el

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -618,11 +618,9 @@ and jump to the corresponding one."
618618
limit
619619
ov)
620620
(when (evil--flyspell-overlay-at pos forwardp)
621-
(if (/= pos (point-min))
622-
(setq pos (save-excursion (goto-char pos)
623-
(forward-word (if forwardp 1 -1))
624-
(point)))
625-
(setq pos (point-max))))
621+
(setq pos (save-excursion (goto-char pos)
622+
(forward-word (if forwardp 1 -1))
623+
(point))))
626624
(setq limit (if forwardp (point-max) (point-min))
627625
ov (evil--flyspell-overlay-after pos limit forwardp))
628626
(if ov

evil-tests.el

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5850,7 +5850,17 @@ Line 2"))
58505850
("[s")
58515851
"I cannt tpye for [l]yfe"
58525852
("[s")
5853-
"I cannt [t]pye for lyfe"))
5853+
"I cannt [t]pye for lyfe")
5854+
(evil-test-buffer
5855+
"[o]en otw thre"
5856+
(flyspell-mode)
5857+
(flyspell-buffer)
5858+
("]s")
5859+
"oen [o]tw thre"
5860+
("]s")
5861+
"oen otw [t]hre"
5862+
("]s")
5863+
"[o]en otw thre"))
58545864
(ert-info ("With count")
58555865
(evil-test-buffer
58565866
"[I] cannt tpye for lyfe"

0 commit comments

Comments
 (0)