Flyspell relies on the sorting order of overlays from 'overlays-in'
that returned the overlays sorted by decreased 'overlay-start'.
But after the recent merge of the noverlay branch, the order was reversed.
So need to change the order back to the expected by Flyspell.
* lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-word):
Sort overlays returned from 'overlays-in' descending by 'overlay-start'.
;; only reset if a new overlay exists
(setq flyspell-auto-correct-previous-pos nil)
- (let ((overlay-list (overlays-in (point-min) position))
+ (let ((overlay-list (seq-sort-by
+ #'overlay-start #'>
+ (overlays-in (point-min) position)))
(new-overlay 'dummy-value))
;; search for previous (new) flyspell overlay