branch: master
commit 7104ad532419689513d8f72dc61badd4e0272558
Author: Artur Malabarba <[email protected]>
Commit: Artur Malabarba <[email protected]>

    Fix #42 - beacon--dec reaching end of buffer
---
 beacon.el |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/beacon.el b/beacon.el
index 7b2289f..adf6e1d 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))

Reply via email to