Closed michaelmhoffman closed 5 years ago
(avy--find-visible-regions (point-min) (point-max))
returns ((1 . 30) (53 . 76))
.
30 is the newline after incxrrect
53 is the i
in incorr3ct
76 is the end of buffer
Expected: ((1 . 76))
That is the output I get when I have flyspell-mode
disabled.
For me, (avy--find-visible-regions (point-min) (point-max)) returns ((1 . 13) (21 . 30) (32 . 45) (53 . 62) (64 . 75))
.
So I can't reproduce the bug.
Tried make run
from this repository that launched emacs-26.1 -Q
. Still can't reproduce.
Here's a more straightforward test case. I'm using the latest avy from MELPA stable (0.4.0) but can try with the repo version.
test.el
in same direction as test.org
:(require 'package)
(setq package-load-list
'((avy "0.4.0")))
(package-initialize)
(find-file "test.org")
(flyspell-mode t)
(redisplay)
(flyspell-buffer)
(avy-goto-char ?r)
(message "%s" (avy--find-visible-regions (point-min) (point-max)))
emacs-26.2 -Q -l test.el
Output:
a
Output: ((1 . 30))
Tested on commit a7230906c44a1da78e1405f3694f1e61f43043dc and it works as expected. Please feel free to close.
Could we have a new melpa-stable version with this fix please? :smile:
Thanks again for your work on this useful package and sorry for the confusion.
My script for testing in the avy repo is below for posterity:
(add-to-list 'load-path ".")
(require 'avy)
(find-file "test.org")
(flyspell-mode t)
(redisplay)
(flyspell-buffer)
(avy-goto-char ?r)
(message "%s" (avy--find-visible-regions (point-min) (point-max)))
Thanks.
To reproduce:
(flyspell-mode t)
Create
test.org
with the following contents:Move the cursor over the incorrectly spelled words to ensure they get Flyspell's wavy red underline.
(avy-goto-char ?r)
The only
r
s that are marked are before the first misspelled word, or in subsequent misspelled words, as seen in screenshot: