Mercurial > emacs
changeset 94561:bbc1b1a5633e
(completion--insert-strings): Use string-width rather than length.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 02 May 2008 17:32:51 +0000 |
parents | 9154a25c84c6 |
children | 46f178f2b009 |
files | lisp/ChangeLog lisp/minibuffer.el |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri May 02 17:22:04 2008 +0000 +++ b/lisp/ChangeLog Fri May 02 17:32:51 2008 +0000 @@ -8,6 +8,7 @@ * minibuffer.el (completion-hilit-commonality): Revert last change: the leftover code was actually useful. + (completion--insert-strings): Use string-width rather than length. 2008-05-02 Sam Steingold <sds@gnu.org>
--- a/lisp/minibuffer.el Fri May 02 17:22:04 2008 +0000 +++ b/lisp/minibuffer.el Fri May 02 17:32:51 2008 +0000 @@ -578,8 +578,9 @@ (let* ((length (apply 'max (mapcar (lambda (s) (if (consp s) - (+ (length (car s)) (length (cadr s))) - (length s))) + (+ (string-width (car s)) + (string-width (cadr s))) + (string-width s))) strings))) (window (get-buffer-window (current-buffer) 0)) (wwidth (if window (1- (window-width window)) 79)) @@ -610,8 +611,9 @@ `(display (space :align-to ,column)))) (when (< wwidth (+ (max colwidth (if (consp str) - (+ (length (car str)) (length (cadr str))) - (length str))) + (+ (string-width (car str)) + (string-width (cadr str))) + (string-width str))) column)) (delete-char -2) (insert "\n") (setq column 0)) (if (not (consp str))