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

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

[elpa] externals/posframe e02cd64 04/13: Merge pull request #32 from hex


From: Feng Shu
Subject: [elpa] externals/posframe e02cd64 04/13: Merge pull request #32 from hexmode/fix-face
Date: Sat, 8 Jun 2019 19:42:27 -0400 (EDT)

branch: externals/posframe
commit e02cd647dab509eebdee6ff6e2e4c270aab18e2f
Merge: 219ed02 2e89f6b
Author: tumashu <address@hidden>
Commit: GitHub <address@hidden>

    Merge pull request #32 from hexmode/fix-face
    
    Make posframe work for `emacs -nw`
---
 posframe.el | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/posframe.el b/posframe.el
index 7ef18a2..6a23f03 100644
--- a/posframe.el
+++ b/posframe.el
@@ -531,15 +531,13 @@ 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 ((height (when (integerp position)
-                    (if (= position 1)
-                        (default-line-height)
-                      (aref (font-info
-                             (font-at
-                              (if (and (= position (point-max)))
-                                  (- position 1)
-                                position)))
-                            3)))))
+    (let* ((font (font-at (if (and (= position (point-max)))
+                              (- position 1)
+                            position)))
+           (height (when (integerp position)
+                     (if (or (= position 1) (not (fontp font)))
+                         (default-line-height)
+                       (aref (font-info font) 3)))))
       (setq posframe--last-font-height-info
             (cons position height))
       height)))



reply via email to

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