branch: elpa/popup
commit 2bb4bce820b4ca700f1b1d91bc8092e6e71404c4
Author: Hiroaki Otsu <ootsuhiro...@gmail.com>
Commit: Hiroaki Otsu <ootsuhiro...@gmail.com>

    fix error on popup-delete when char-before return nil
---
 popup.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/popup.el b/popup.el
index c79b7ff..80ac629 100644
--- a/popup.el
+++ b/popup.el
@@ -674,7 +674,8 @@ KEYMAP is a keymap that will be put on the popup contents."
         (popup-save-buffer-state
           (goto-char (point-max))
           (dotimes (i newlines)
-            (if (= (char-before) ?\n)
+            (if (and (char-before)
+                     (= (char-before) ?\n))
                 (delete-char -1)))))))
   nil)
 

Reply via email to