From 2f6ec690f2b0085f4429e6a61fd572757ca8aa78 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 3 Dec 2015 21:35:59 +0000 Subject: [PATCH] Fix #38 - bob error introduced by previous commit --- beacon.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon.el b/beacon.el index c2b5f6b0b..76c0db0dd 100644 --- a/beacon.el +++ b/beacon.el @@ -256,8 +256,9 @@ Only returns `beacon-size' elements." (defun beacon--color-range () "Return a list of background colors for the beacon." (let* ((default-bg (or (save-excursion - (forward-line 1) - (forward-char -1) + (unless (eobp) + (forward-line 1) + (unless (bobp) (forward-char -1))) (background-color-at-point)) (face-background 'default))) (bg (color-values (if (string-match "\\`unspecified-" default-bg) -- 2.39.2