emacs-diffs
[Top][All Lists]
Advanced

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

master f9aa499: Further fixups of the variable-pitch eww header line cha


From: Lars Ingebrigtsen
Subject: master f9aa499: Further fixups of the variable-pitch eww header line change
Date: Sun, 13 Sep 2020 12:52:29 -0400 (EDT)

branch: master
commit f9aa499afa2f65952b5ec7905bf836f6a2ccbfd4
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Further fixups of the variable-pitch eww header line change
    
    * lisp/net/eww.el (eww-update-header-line-format): Protect against
    :url not being set.
---
 lisp/net/eww.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 69dc2d4..2717dfb 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -730,8 +730,7 @@ Currently this means either text/html or 
application/xhtml+xml."
   (setq header-line-format
        (and eww-header-line-format
             (let ((peer (plist-get eww-data :peer))
-                   (url (propertize (plist-get eww-data :url)
-                                    'face 'variable-pitch))
+                   (url (plist-get eww-data :url))
                    (title (propertize
                            (if (zerop (length (plist-get eww-data :title)))
                               "[untitled]"
@@ -747,10 +746,13 @@ Currently this means either text/html or 
application/xhtml+xml."
                ;; Limit the length of the title so that the host name
                ;; of the URL is always visible.
                (when url
+                 (setq url (propertize url 'face 'variable-pitch))
                  (let* ((parsed (url-generic-parse-url url))
                         (host-length (shr-string-pixel-width
-                                      (format "%s://%s" (url-type parsed)
-                                              (url-host parsed))))
+                                      (propertize
+                                       (format "%s://%s" (url-type parsed)
+                                               (url-host parsed))
+                                       'face 'variable-pitch)))
                         (width (window-width nil t)))
                    (cond
                     ;; The host bit is wider than the window, so nix



reply via email to

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