From: Artur Malabarba Date: Mon, 25 Jan 2016 11:47:53 +0000 (+0000) Subject: Fix #42 - beacon--dec reaching end of buffer X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/7104ad532419689513d8f72dc61badd4e0272558 Fix #42 - beacon--dec reaching end of buffer --- diff --git a/beacon.el b/beacon.el index 7b2289f40..adf6e1da7 100644 --- a/beacon.el +++ b/beacon.el @@ -300,8 +300,10 @@ Only returns `beacon-size' elements." (o (delete-overlay o) (save-excursion - (while (progn (forward-char 1) - (setq o (beacon--ov-at-point))) + (while (and (condition-case nil + (progn (forward-char 1) t) + (end-of-buffer nil)) + (setq o (beacon--ov-at-point))) (let ((colors (overlay-get o 'beacon-colors))) (if (not colors) (move-overlay o (1- (point)) (point))