* bug#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored
@ 2012-12-19 5:41 Wesley Dawson
2013-01-04 8:21 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Wesley Dawson @ 2012-12-19 5:41 UTC (permalink / raw)
To: 13224
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
M-x icomplete-mode
M-x set-variable icomplete-prospects-height 1
M-x a
(the candidates list takes up two lines in the minibuffer)
Here's a patch to make icomplete honor `icomplete-prospects-height'
again, which it hasn't since the introduction of `icomplete-separator'
(revno: 111031).
About formatting: the source appears to mix tabs and spaces for
indentation quite freely; I didn't attempt to fix this and went with
what emacs -Q did for formatting.
* lisp/icomplete.el (icomplete-completions): Fix to honor
`icomplete-prospects-height' again.
[-- Attachment #2: Fix to honor `icomplete-prospects-height' again. --]
[-- Type: text/x-patch, Size: 1202 bytes --]
=== modified file 'lisp/icomplete.el'
--- lisp/icomplete.el 2012-12-17 19:43:55 +0000
+++ lisp/icomplete.el 2012-12-19 04:25:35 +0000
@@ -343,8 +343,10 @@
(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 @@
(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))))))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored
2012-12-19 5:41 bug#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored Wesley Dawson
@ 2013-01-04 8:21 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-01-04 8:21 UTC (permalink / raw)
To: 13224-done
Thanks; applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-04 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 5:41 bug#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored Wesley Dawson
2013-01-04 8:21 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).