diff options
| author | Juanma Barranquero | 2014-03-02 01:50:07 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-03-02 01:50:07 +0100 |
| commit | b6e443c5af22e6e43fb5e20599b5dda1c3339966 (patch) | |
| tree | f363d02ad506b34823ba4f1d8a11f08b4f129f0a /lisp | |
| parent | 1850913d96126ca52c8dc5beadc82b004477b0cf (diff) | |
| download | emacs-b6e443c5af22e6e43fb5e20599b5dda1c3339966.tar.gz emacs-b6e443c5af22e6e43fb5e20599b5dda1c3339966.zip | |
lisp/icomplete.el (icomplete-completions): Use string-width.
Suggested by Stefan Monier <monnier@iro.umontreal.ca>.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/icomplete.el | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d25f877a644..e5c44a1232a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-02 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * icomplete.el (icomplete-completions): Use string-width. | ||
| 4 | Suggested by Stefan Monier <monnier@iro.umontreal.ca>. | ||
| 5 | |||
| 1 | 2014-03-01 Dmitry Gutov <dgutov@yandex.ru> | 6 | 2014-03-01 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 7 | ||
| 3 | * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight | 8 | * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight |
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index e3f7fde7797..626d63914d8 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -403,14 +403,14 @@ matches exist." | |||
| 403 | (substring most compare)) | 403 | (substring most compare)) |
| 404 | ;; Don't bother truncating if it doesn't gain | 404 | ;; Don't bother truncating if it doesn't gain |
| 405 | ;; us at least 2 columns. | 405 | ;; us at least 2 columns. |
| 406 | ((< compare (+ 2 (length ellipsis))) most) | 406 | ((< compare (+ 2 (string-width ellipsis))) most) |
| 407 | (t (concat ellipsis (substring most compare)))) | 407 | (t (concat ellipsis (substring most compare)))) |
| 408 | close-bracket))) | 408 | close-bracket))) |
| 409 | ;;"-prospects" - more than one candidate | 409 | ;;"-prospects" - more than one candidate |
| 410 | (prospects-len (+ (string-width | 410 | (prospects-len (+ (string-width |
| 411 | (or determ (concat open-bracket close-bracket))) | 411 | (or determ (concat open-bracket close-bracket))) |
| 412 | (string-width icomplete-separator) | 412 | (string-width icomplete-separator) |
| 413 | (+ 2 (length ellipsis)) ;; take {…} into account | 413 | (+ 2 (string-width ellipsis)) ;; take {…} into account |
| 414 | (string-width (buffer-string)))) | 414 | (string-width (buffer-string)))) |
| 415 | (prospects-max | 415 | (prospects-max |
| 416 | ;; Max total length to use, including the minibuffer content. | 416 | ;; Max total length to use, including the minibuffer content. |