diff options
| author | Lars Ingebrigtsen | 2020-09-13 17:06:35 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-09-13 17:06:35 +0200 |
| commit | dc01b992e27e91631e67bb94f32c23275f1eacfd (patch) | |
| tree | 8de130c37ba3c72698595ee0534a300d270ab4cf | |
| parent | 2bd41321a6d9f6b478dd73aa9a2ea32709e57b32 (diff) | |
| download | emacs-dc01b992e27e91631e67bb94f32c23275f1eacfd.tar.gz emacs-dc01b992e27e91631e67bb94f32c23275f1eacfd.zip | |
Make the eww header work again even if the title is nil
* lisp/net/eww.el (eww-update-header-line-format): Don't bug out
if the title isn't set at all.
| -rw-r--r-- | lisp/net/eww.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 5fd44901936..69dc2d47d67 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -729,14 +729,15 @@ Currently this means either text/html or application/xhtml+xml." | |||
| 729 | (defun eww-update-header-line-format () | 729 | (defun eww-update-header-line-format () |
| 730 | (setq header-line-format | 730 | (setq header-line-format |
| 731 | (and eww-header-line-format | 731 | (and eww-header-line-format |
| 732 | (let ((title (propertize (plist-get eww-data :title) | 732 | (let ((peer (plist-get eww-data :peer)) |
| 733 | 'face 'variable-pitch)) | ||
| 734 | (peer (plist-get eww-data :peer)) | ||
| 735 | (url (propertize (plist-get eww-data :url) | 733 | (url (propertize (plist-get eww-data :url) |
| 736 | 'face 'variable-pitch))) | 734 | 'face 'variable-pitch)) |
| 737 | (when (zerop (length title)) | 735 | (title (propertize |
| 738 | (setq title (propertize "[untitled]" 'face 'variable-pitch))) | 736 | (if (zerop (length (plist-get eww-data :title))) |
| 739 | ;; This connection has is https. | 737 | "[untitled]" |
| 738 | (plist-get eww-data :title)) | ||
| 739 | 'face 'variable-pitch))) | ||
| 740 | ;; This connection is https. | ||
| 740 | (when peer | 741 | (when peer |
| 741 | (add-face-text-property 0 (length title) | 742 | (add-face-text-property 0 (length title) |
| 742 | (if (plist-get peer :warnings) | 743 | (if (plist-get peer :warnings) |