mu4e: show '...' when header field folded and keep text-properties

This commit is contained in:
Jun Hao 2016-08-28 10:35:55 +08:00
parent 37f11d642f
commit 0926ac6867
1 changed files with 6 additions and 5 deletions

View File

@ -371,12 +371,13 @@ add text-properties to VAL."
(setq folded t)))
(overlays-at value-pos))
(unless folded
(let ((o (make-overlay value-pos (field-end value-pos))))
(let* ((o (make-overlay value-pos (field-end value-pos)))
(vals (split-string (field-string value-pos) "\n" t))
(val (if (= (length vals) 1)
(car vals)
(concat (substring (car vals) 0 -3) "..."))))
(overlay-put o 'mu4e~view-header-field-folded t)
(overlay-put o 'display (car
(split-string
(field-string-no-properties value-pos)
"\n" t))))))))))
(overlay-put o 'display val))))))))
(defun mu4e~view-compose-contact (&optional point)
"Compose a message for the address at point."