From 7104ad532419689513d8f72dc61badd4e0272558 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 25 Jan 2016 11:47:53 +0000 Subject: [PATCH] Fix #42 - beacon--dec reaching end of buffer --- beacon.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)) -- 2.39.2