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

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

[elpa] master d4d53d8 059/167: ivy.el (ivy-partial): Fix for fuzzy compl


From: Oleh Krehel
Subject: [elpa] master d4d53d8 059/167: ivy.el (ivy-partial): Fix for fuzzy completion
Date: Tue, 08 Dec 2015 10:49:53 +0000

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

    ivy.el (ivy-partial): Fix for fuzzy completion
    
    Postfix doesn't always work if the completion is fuzzy, so check if
    `string-match' succeeds.
    
    Fixes #266
---
 ivy.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 155d1d5..649dcae 100644
--- a/ivy.el
+++ b/ivy.el
@@ -454,7 +454,10 @@ If the text hasn't changed as a result, forward to 
`ivy-alt-done'."
          (new (try-completion (if startp
                                   (substring postfix 1)
                                 postfix)
-                              (mapcar (lambda (str) (substring str 
(string-match postfix str)))
+                              (mapcar (lambda (str)
+                                        (let ((i (string-match postfix str)))
+                                          (when i
+                                            (substring str i))))
                                       ivy--old-cands))))
     (cond ((eq new t) nil)
           ((string= new ivy-text) nil)



reply via email to

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