avy.el (avy-goto-subword-1): Check char-after

When at `point-max', `char-after' returns nil. This can't be passed to `downcase'.

Fixes #163
This commit is contained in:
Oleh Krehel
2016-07-11 17:58:26 +02:00
parent 07153e4fb7
commit dd112c88e2

4
avy.el
View File

@@ -1174,7 +1174,9 @@ The case of CHAR is ignored."
(interactive (list (read-char "char: " t)
current-prefix-arg))
(avy-with avy-goto-subword-1
(let ((char (downcase char)))
(let ((char (downcase char)))
(avy-goto-subword-0
arg (lambda ()
(and (char-after)
(eq (downcase (char-after)) char)))))))