aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/tabulated-list.el9
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 731a443390c..ed5dc39021b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-03-20 Chong Yidong <cyd@gnu.org>
2
3 * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use
4 string-width and truncate-string-width to handle arbitrary
5 characters.
6
12012-03-20 Tassilo Horn <tassilo@member.fsf.org> 72012-03-20 Tassilo Horn <tassilo@member.fsf.org>
2 8
3 * textmodes/artist.el (artist-menu-map): Bind Rectangle menu item 9 * textmodes/artist.el (artist-menu-map): Bind Rectangle menu item
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 8fe514ab551..f17b12da6a0 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -278,11 +278,10 @@ of column descriptors."
278 (width (nth 1 format)) 278 (width (nth 1 format))
279 (label (if (stringp desc) desc (car desc))) 279 (label (if (stringp desc) desc (car desc)))
280 (help-echo (concat (car format) ": " label))) 280 (help-echo (concat (car format) ": " label)))
281 ;; Truncate labels if necessary. 281 ;; Truncate labels if necessary (except last column).
282 (and (> width 6) 282 (and (< (1+ n) len)
283 (> (length label) width) 283 (> (string-width label) width)
284 (setq label (concat (substring label 0 (- width 3)) 284 (setq label (truncate-string-to-width label width nil nil t)))
285 "...")))
286 (setq label (bidi-string-mark-left-to-right label)) 285 (setq label (bidi-string-mark-left-to-right label))
287 (if (stringp desc) 286 (if (stringp desc)
288 (insert (propertize label 'help-echo help-echo)) 287 (insert (propertize label 'help-echo help-echo))