From: plugd Date: Sun, 18 Jul 2021 17:50:26 +0000 (+0200) Subject: Header-wrapping code was broken for terminal emacs. X-Git-Tag: v2.10.3~2 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=22462735d43377874d01871e9749116916d180f5;p=elpher.git Header-wrapping code was broken for terminal emacs. --- diff --git a/elpher.el b/elpher.el index 307647a..77ef234 100644 --- a/elpher.el +++ b/elpher.el @@ -1372,9 +1372,11 @@ by HEADER-LINE." (2 'elpher-gemini-heading2) (3 'elpher-gemini-heading3) (_ 'default))) - (fill-column (/ (* fill-column - (font-get (font-spec :name (face-font 'default)) :size)) - (font-get (font-spec :name (face-font face)) :size)))) + (fill-column (if (display-graphic-p) + (/ (* fill-column + (font-get (font-spec :name (face-font 'default)) :size)) + (font-get (font-spec :name (face-font face)) :size)) + fill-column))) (unless (display-graphic-p) (insert (make-string level ?#) " ")) (insert (propertize header 'face face))