X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=elpher.el;h=b9c43f87183cab7affca96b4ea238d0ed7696d7c;hp=0cd846a4bd4c29936fddd65a80e8b415ddd26b7e;hb=766a56746d122a9a35d5ac76830acb3123134c70;hpb=7e6b71d0cf4ccf5d94a95c58fc35ebf2fd09920b diff --git a/elpher.el b/elpher.el index 0cd846a..b9c43f8 100644 --- a/elpher.el +++ b/elpher.el @@ -577,13 +577,14 @@ previously-visited pages,unless NO-HISTORY is non-nil." "If `elpher-use-header' is true, display current page info in window header." (if elpher-use-header (let* ((display-string (elpher-page-display-string elpher-current-page)) + (sanitized-display-string (replace-regexp-in-string "%" "%%" display-string)) (address (elpher-page-address elpher-current-page)) (tls-string (if (and (not (elpher-address-about-p address)) (member (elpher-address-protocol address) '("gophers" "gemini"))) " [TLS encryption]" "")) - (header (concat display-string + (header (concat sanitized-display-string (propertize tls-string 'face 'bold)))) (setq header-line-format header)))) @@ -1132,12 +1133,8 @@ If ADDRESS is not supplied or nil the record is rendered as an nil t)) (window (get-buffer-window elpher-buffer-name))) (when window - (setf (image-property image :max-width) (window-pixel-width window)) - (setf (image-property image :max-height) (- (window-pixel-height window) - (window-header-line-height window) - (window-mode-line-height window) - (window-scroll-bar-height window) - (window-bottom-divider-width window)))) + (setf (image-property image :max-width) (window-body-width window t)) + (setf (image-property image :max-height) (window-body-height window t))) (elpher-with-clean-buffer (insert-image image) (elpher-restore-pos)))