emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111419: icomplete-prospects-height f


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111419: icomplete-prospects-height fix (tiny change)
Date: Fri, 04 Jan 2013 00:20:49 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111419
fixes bug: http://debbugs.gnu.org/13224
author: Wesley Dawson <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2013-01-04 00:20:49 -0800
message:
  icomplete-prospects-height fix (tiny change)
  
  * icomplete.el (icomplete-completions):
  Honor icomplete-prospects-height once more following 2012-11-29 changes.
modified:
  lisp/ChangeLog
  lisp/icomplete.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-01-04 03:42:11 +0000
+++ b/lisp/ChangeLog    2013-01-04 08:20:49 +0000
@@ -1,3 +1,9 @@
+2013-01-04  Wesley Dawson  <address@hidden>  (tiny change)
+
+       * icomplete.el (icomplete-completions):
+       Honor icomplete-prospects-height once more following
+       2012-11-29 changes.  (Bug#13224)
+
 2013-01-04  Stefan Monnier  <address@hidden>
 
        * subr.el (internal--called-interactively-p--get-frame): Find aliases

=== modified file 'lisp/icomplete.el'
--- a/lisp/icomplete.el 2013-01-02 16:13:04 +0000
+++ b/lisp/icomplete.el 2013-01-04 08:20:49 +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))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]