aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Dawson2013-01-04 00:20:49 -0800
committerGlenn Morris2013-01-04 00:20:49 -0800
commitbdd9367d4edddbbe745dad84eb33226d0ab969e4 (patch)
treeb9a82323fe969da2164a4041e5a729238ce8646e
parentc0bd248ccb698c6b665a6fd1f50251b54285c98b (diff)
downloademacs-bdd9367d4edddbbe745dad84eb33226d0ab969e4.tar.gz
emacs-bdd9367d4edddbbe745dad84eb33226d0ab969e4.zip
icomplete-prospects-height fix (tiny change)
* icomplete.el (icomplete-completions): Honor icomplete-prospects-height once more following 2012-11-29 changes. Fixes: debbugs:13224
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/icomplete.el10
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc1e652eb5d..0dbe5ac0eb7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-01-04 Wesley Dawson <whd@lavabit.com> (tiny change)
2
3 * icomplete.el (icomplete-completions):
4 Honor icomplete-prospects-height once more following
5 2012-11-29 changes. (Bug#13224)
6
12013-01-04 Stefan Monnier <monnier@iro.umontreal.ca> 72013-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * subr.el (internal--called-interactively-p--get-frame): Find aliases 9 * subr.el (internal--called-interactively-p--get-frame): Find aliases
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 0493a5b49e8..9407de4f6d9 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -343,8 +343,10 @@ are exhibited within the square braces.)"
343 (t (concat "…" (substring most compare)))) 343 (t (concat "…" (substring most compare))))
344 close-bracket))) 344 close-bracket)))
345 ;;"-prospects" - more than one candidate 345 ;;"-prospects" - more than one candidate
346 (prospects-len (+ (length determ) 6 ;; take {,...} into account 346 (prospects-len (+ (length determ)
347 (string-width (buffer-string)))) 347 (string-width icomplete-separator)
348 3 ;; take {…} into account
349 (string-width (buffer-string))))
348 (prospects-max 350 (prospects-max
349 ;; Max total length to use, including the minibuffer content. 351 ;; Max total length to use, including the minibuffer content.
350 (* (+ icomplete-prospects-height 352 (* (+ icomplete-prospects-height
@@ -375,7 +377,9 @@ are exhibited within the square braces.)"
375 (cond ((string-equal comp "") (setq most-is-exact t)) 377 (cond ((string-equal comp "") (setq most-is-exact t))
376 ((member comp prospects)) 378 ((member comp prospects))
377 (t (setq prospects-len 379 (t (setq prospects-len
378 (+ (string-width comp) 1 prospects-len)) 380 (+ (string-width comp)
381 (string-width icomplete-separator)
382 prospects-len))
379 (if (< prospects-len prospects-max) 383 (if (< prospects-len prospects-max)
380 (push comp prospects) 384 (push comp prospects)
381 (setq limit t)))))) 385 (setq limit t))))))