emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/posframe 3f96881 05/13: Fix: "doesn't work if the buffe


From: Feng Shu
Subject: [elpa] externals/posframe 3f96881 05/13: Fix: "doesn't work if the buffer is empty"
Date: Sat, 8 Jun 2019 19:42:27 -0400 (EDT)

branch: externals/posframe
commit 3f96881825fe289483a46ae870e518a3fc5c451e
Author: Feng Shu <address@hidden>
Commit: Feng Shu <address@hidden>

    Fix: "doesn't work if the buffer is empty"
---
 posframe.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/posframe.el b/posframe.el
index 6a23f03..6fc32c6 100644
--- a/posframe.el
+++ b/posframe.el
@@ -531,9 +531,11 @@ you can use `posframe-delete-all' to delete all posframes."
   "Get the font's height at POSITION."
   (if (eq position (car posframe--last-font-height-info))
       (cdr posframe--last-font-height-info)
-    (let* ((font (font-at (if (and (= position (point-max)))
-                              (- position 1)
-                            position)))
+    (let* ((font (when (and (integerp position)
+                            (not (= position 1)))
+                   (font-at (if (and (= position (point-max)))
+                                (- position 1)
+                              position))))
            (height (when (integerp position)
                      (if (or (= position 1) (not (fontp font)))
                          (default-line-height)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]