* mu4e-view: fill headers before display, so they don't run off the screen

This commit is contained in:
djcb
2012-04-18 19:13:34 +03:00
parent 54ce26cc11
commit 0915ae96c0

View File

@ -138,16 +138,17 @@ marking if it still had that."
(mu4e-view-mark-as-read-maybe)))))
(defun mu4e-view-header (key val &optional dont-propertize-val)
"Show header FIELD for MSG with KEY. ie. <KEY>: value-of-FIELD."
"Return header KEY with value VAL if VAL is non-nil. If
DONT-PROPERTIZE-VAL, do not add text-properties to VAL."
(if val
(concat
(propertize key 'face 'mu4e-view-header-key-face) ": "
(with-temp-buffer
(insert (propertize key 'face 'mu4e-view-header-key-face) ": "
(if dont-propertize-val
val
(propertize val 'face 'mu4e-view-header-value-face))
"\n")
(propertize val 'face 'mu4e-view-header-value-face)) "\n")
(fill-region (point-min) (point-max))
(buffer-string))
""))