summaryrefslogtreecommitdiff
path: root/lisp/mpc.el
diff options
context:
space:
mode:
authorDavid Cadé <codename68@gmail.com>2012-12-12 09:42:03 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2012-12-12 09:42:03 -0500
commitfd49a2185ff4f1710bc337168fd15af91064a74e (patch)
tree4899e44429ed266148b412cde69321d312712d76 /lisp/mpc.el
parent4a9a8f1387fc4ed34a042ac9dfa66e79b59c55d7 (diff)
downloademacs-fd49a2185ff4f1710bc337168fd15af91064a74e.tar.gz
* lisp/mpc.el (mpc-format): Use truncate-string-to-width.
Fixes: debbugs:13143
Diffstat (limited to 'lisp/mpc.el')
-rw-r--r--lisp/mpc.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el
index e8b5c50e561..65363de40f3 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1034,11 +1034,8 @@ If PLAYLIST is t or nil or missing, use the main playlist."
(let ((display
(if (and size
(> (+ postwidth textwidth) size))
- ;; This doesn't even obey double-width chars :-(
(propertize
- (if (zerop (- size postwidth 1))
- (substring text 0 1)
- (concat (substring text 0 (- size postwidth textwidth 1)) "…"))
+ (truncate-string-to-width text size nil nil "…")
'help-echo text)
text)))
(when (memq tag '(Artist Album Composer)) ;FIXME: wrong list.