I am not sure exactly what the conditions are that cause this bug to actually occur, but sometimes when avy-goto-char is called on some files it is possible for an error to occur. The culprits appear to be these lines in avy--overlay:
Sometimes when avy--overlay is called, str can be the empty string which causes the following error when add-text-properties
progn: Args out of range: 0, 1
Fortunately, it is easy to fix this by making sure that str is not empty before these two calls to add-text-properties. I will submit a pull request shortly. I have also attached a minimal example of when this error occurs. Simply go the bottom of the buffer and then press M-x avy-goto-char m and the error should occur.
break-avy.txt
I am not sure exactly what the conditions are that cause this bug to actually occur, but sometimes when avy-goto-char is called on some files it is possible for an error to occur. The culprits appear to be these lines in
avy--overlay
:Sometimes when
avy--overlay
is called, str can be the empty string which causes the following error whenadd-text-properties
Fortunately, it is easy to fix this by making sure that str is not empty before these two calls to
add-text-properties
. I will submit a pull request shortly. I have also attached a minimal example of when this error occurs. Simply go the bottom of the buffer and then pressM-x avy-goto-char m
and the error should occur. break-avy.txt