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

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

[elpa] master 05763ae 121/399: counsel.el (counsel-git): Fix default-dir


From: Oleh Krehel
Subject: [elpa] master 05763ae 121/399: counsel.el (counsel-git): Fix default-directory
Date: Sat, 20 Jul 2019 14:57:04 -0400 (EDT)

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

    counsel.el (counsel-git): Fix default-directory
---
 counsel.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/counsel.el b/counsel.el
index fb26f4f..f3efba1 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1203,10 +1203,11 @@ Like `locate-dominating-file', but DIR defaults to
 INITIAL-INPUT can be given as the initial minibuffer input."
   (interactive)
   (counsel-require-program counsel-git-cmd)
-  (ivy-read "Find file: " (counsel-git-cands)
-            :initial-input initial-input
-            :action #'counsel-git-action
-            :caller 'counsel-git))
+  (let ((default-directory (counsel-locate-git-root)))
+    (ivy-read "Find file: " (counsel-git-cands)
+              :initial-input initial-input
+              :action #'counsel-git-action
+              :caller 'counsel-git)))
 
 (defun counsel-git-action (x)
   "Find file X in current Git repository."



reply via email to

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