GNU bug report logs -
#13224
24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored
Previous Next
Reported by: Wesley Dawson <whd <at> lavabit.com>
Date: Wed, 19 Dec 2012 08:06:02 UTC
Severity: normal
Tags: patch
Found in version 24.3.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 04 Jan 2013 03:21:26 -0500
with message-id <c47gnticjd.fsf <at> fencepost.gnu.org>
and subject line Re: bug#13224: 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored
has caused the debbugs.gnu.org bug report #13224,
regarding 24.3.50; [PATCH] Variable `icomplete-prospects-height' is no longer honored
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
13224: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13224
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
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.
[patch.diff (text/x-patch, inline)]
=== 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))))))
[Message part 5 (message/rfc822, inline)]
Thanks; applied.
This bug report was last modified 12 years and 197 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.