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

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

[elpa] master 824f8d7 072/184: counsel.el (counsel--find-return-list): W


From: Oleh Krehel
Subject: [elpa] master 824f8d7 072/184: counsel.el (counsel--find-return-list): Works with or without "./" prefix
Date: Wed, 16 Oct 2019 13:14:51 -0400 (EDT)

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

    counsel.el (counsel--find-return-list): Works with or without "./" prefix
    
    Fixes #2196
---
 counsel.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/counsel.el b/counsel.el
index 0885322..6314d51 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2605,12 +2605,13 @@ FZF-PROMPT, if non-nil, is passed as `ivy-read' prompt 
argument."
   (counsel--call
    (cons find-program args)
    (lambda ()
-     (goto-char (point-min))
      (let (files)
+       (goto-char (point-min))
        (while (< (point) (point-max))
-         (push (buffer-substring
-                (+ 2 (line-beginning-position)) (line-end-position)) files)
-         (forward-line 1))
+         (when (looking-at "\\./")
+           (goto-char (match-end 0)))
+         (push (buffer-substring (point) (line-end-position)) files)
+         (beginning-of-line 2))
        (nreverse files)))))
 
 (defcustom counsel-file-jump-args (split-string ". -name .git -prune -o -type 
f -print")



reply via email to

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