bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#48408: BUGFIX: window-default-font-height: check for nil string


From: Eli Zaretskii
Subject: bug#48408: BUGFIX: window-default-font-height: check for nil string
Date: Sun, 16 May 2021 11:30:11 +0300

> Date: Sun, 16 May 2021 02:59:05 -0400
> From: Boruch Baum <boruch_baum@gmx.com>
> 
> On 2021-05-16 09:29, Eli Zaretskii wrote:
> > Boruch, can you try the patch below?
> 
> The hunks don't patch cleanly, but I can try doing it
> manually ... after yom tov. Chag Sameyach.

Which is a Good Thing, because I've changed my mind.  Please try the
much simpler patch below.

Martin, same question about this one.  I decided that there's nothing
wrong with how we compute frame-type in the display-*-p predicates;
it's window-default-font-height that trusts the 'display' frame
parameter too much.  WDYT?

diff --git a/lisp/window.el b/lisp/window.el
index 026cde5..4b99b77 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -8786,7 +8786,11 @@ window-default-font-height
   (let* ((window (window-normalize-window window t))
         (frame (window-frame window))
         (default-font (face-font 'default frame)))
-    (if (and (display-multi-font-p (frame-parameter frame 'display))
+    ;; Client frames can have the 'display' parameter set like for X
+    ;; frames, even though they are TTY frames, so make sure we won't
+    ;; be duped by that up front with 'framep'.
+    (if (and (not (eq (framep frame) t))
+             (display-multi-font-p (frame-parameter frame 'display))
             (not (string-equal (frame-parameter frame 'font) default-font)))
         (aref (font-info default-font frame) 3)
       (frame-char-height frame))))





reply via email to

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