aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorWesley Dawson <[email protected]>2013-01-04 00:20:49 -0800
committerGlenn Morris <[email protected]>2013-01-04 00:20:49 -0800
commitbdd9367d4edddbbe745dad84eb33226d0ab969e4 (patch)
treeb9a82323fe969da2164a4041e5a729238ce8646e /lisp
parentc0bd248ccb698c6b665a6fd1f50251b54285c98b (diff)
icomplete-prospects-height fix (tiny change)
* icomplete.el (icomplete-completions): Honor icomplete-prospects-height once more following 2012-11-29 changes. Fixes: debbugs:13224
Diffstat (limited to 'lisp')
-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 cc1e652eb5..0dbe5ac0eb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-04 Wesley Dawson <[email protected]> (tiny change)
+
+ * icomplete.el (icomplete-completions):
+ Honor icomplete-prospects-height once more following
+ 2012-11-29 changes. (Bug#13224)
+
2013-01-04 Stefan Monnier <[email protected]>
* subr.el (internal--called-interactively-p--get-frame): Find aliases
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 0493a5b49e..9407de4f6d 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -343,8 +343,10 @@ are exhibited within the square braces.)"
(t (concat "…" (substring most compare))))
close-bracket)))
;;"-prospects" - more than one candidate
- (prospects-len (+ (length determ) 6 ;; take {,...} into account
- (string-width (buffer-string))))
+ (prospects-len (+ (length determ)
+ (string-width icomplete-separator)
+ 3 ;; take {…} into account
+ (string-width (buffer-string))))
(prospects-max
;; Max total length to use, including the minibuffer content.
(* (+ icomplete-prospects-height
@@ -375,7 +377,9 @@ are exhibited within the square braces.)"
(cond ((string-equal comp "") (setq most-is-exact t))
((member comp prospects))
(t (setq prospects-len
- (+ (string-width comp) 1 prospects-len))
+ (+ (string-width comp)
+ (string-width icomplete-separator)
+ prospects-len))
(if (< prospects-len prospects-max)
(push comp prospects)
(setq limit t))))))