* lisp/icomplete.el (icomplete-completions): Also use … to truncate prefix.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Dec 2012 19:43:55 +0000 (14:43 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Dec 2012 19:43:55 +0000 (14:43 -0500)
lisp/ChangeLog
lisp/icomplete.el

index 464ff7e..9d05f2f 100644 (file)
@@ -1,3 +1,7 @@
+2012-12-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * icomplete.el (icomplete-completions): Also use … to truncate prefix.
+
 2012-12-17  Kevin Ryde  <user42@zip.com.au>
 
        * files.el (auto-save-file-name-p): Use \` and \' (bug#13186).
index 08d8c28..5882acc 100644 (file)
@@ -337,8 +337,10 @@ are exhibited within the square braces.)"
                                ((= compare (length name))
                                  ;; Typical case: name is a prefix.
                                 (substring most compare))
-                               ((< compare 5) most)
-                               (t (concat "..." (substring most compare))))
+                                ;; Don't bother truncating if it doesn't gain
+                                ;; us at least 2 columns.
+                               ((< compare 3) most)
+                               (t (concat "…" (substring most compare))))
                               close-bracket)))
             ;;"-prospects" - more than one candidate
             (prospects-len (+ (length determ) 6 ;; take {,...} into account