[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39898: 28.0.50; The off-by-one bug in `flyspell-check-previous-highl
From: |
Stefan Kangas |
Subject: |
bug#39898: 28.0.50; The off-by-one bug in `flyspell-check-previous-highlighted-word' |
Date: |
Fri, 28 Aug 2020 02:52:19 -0700 |
Eli Zaretskii <eliz@gnu.org> writes:
> The test case, AFAIU, creates a situation where the misspelled word
> starts _after_ point (remember that point is a place between 2
> characters, and its value is the character following point). So I
> don't see a bug here. Am I missing something?
No, the misspelled word starts before point. Note that `insert' moves
point to after the inserted text.
(with-temp-buffer
(select-window (display-buffer (current-buffer)))
(insert "appl")
(message "%s" (point)) ; 5
(flyspell-buffer)
(flyspell-check-previous-highlighted-word))
The problem is there even if you type a misspelled word manually at
(point-min) and run `flyspell-check-previous-highlighted-word'.