Fix #3586: truncated filenames from counsel-file-jump

When using ripgrep instead of fd.
This commit is contained in:
Henrik Lissner 2020-07-18 19:40:01 -04:00
parent 63a94698a2
commit 89915715a6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -296,10 +296,9 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(cons find-program args)
(lambda ()
(goto-char (point-min))
(let ((offset (if (member find-program (list "rg" doom-projectile-fd-binary)) 0 2))
files)
(let (files)
(while (< (point) (point-max))
(push (buffer-substring (+ offset (line-beginning-position)) (line-end-position))
(push (buffer-substring (line-beginning-position) (line-end-position))
files)
(forward-line 1))
(nreverse files)))))))