Skip to content

Commit

Permalink
avy.el (avy-goto-subword-1): Check char-after
Browse files Browse the repository at this point in the history
When at `point-max', `char-after' returns nil. This can't be passed to `downcase'.

Fixes #163
  • Loading branch information
abo-abo committed Jul 11, 2016
1 parent 07153e4 commit dd112c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion avy.el
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,9 @@ The case of CHAR is ignored."
(avy-with avy-goto-subword-1
(let ((char (downcase char)))
(avy-goto-subword-0
arg (lambda () (eq (downcase (char-after)) char))))))
arg (lambda ()
(and (char-after)
(eq (downcase (char-after)) char)))))))

;;;###autoload
(defun avy-goto-word-or-subword-1 ()
Expand Down

0 comments on commit dd112c8

Please sign in to comment.