emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master ae2fd1a 21/31: Improve hidden buffer completion further


From: Oleh Krehel
Subject: [elpa] master ae2fd1a 21/31: Improve hidden buffer completion further
Date: Fri, 01 May 2015 14:28:59 +0000

branch: master
commit ae2fd1acad70b66b94e5658641a1fc14468d2319
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Improve hidden buffer completion further
    
    * ivy.el (ivy--exhibit): Update.
    
    Fixes #68
    Fixes #69
---
 ivy.el |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index 172b607..37c9c94 100644
--- a/ivy.el
+++ b/ivy.el
@@ -820,14 +820,20 @@ Should be run via minibuffer `post-command-hook'."
              (if (string-match "~$" ivy-text)
                  (ivy--cd (expand-file-name "~/")))))
           ((and (eq ivy--collection 'internal-complete-buffer)
-                (> (length ivy-text) 0)
                 (or (= (length ivy--old-text) 0)
-                    (/= (aref ivy-text 0)
-                        (aref ivy--old-text 0))))
+                    (condition-case nil
+                        (/= (aref ivy-text 0)
+                            (aref ivy--old-text 0))
+                      (error t))))
            (setq ivy--all-candidates
                  (all-completions
-                  (if (eq (aref ivy-text 0) ?\ ) " " "")
-                  'internal-complete-buffer))))
+                  (if (and (> (length ivy-text) 0)
+                           (eq (aref ivy-text 0)
+                               ?\ ))
+                      " "
+                    "")
+                  'internal-complete-buffer))
+           (setq ivy--old-re " ")))
     (ivy--insert-minibuffer
      (ivy--format
       (ivy--filter ivy-text ivy--all-candidates))))



reply via email to

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