branch: master
commit 966525c94d0362a41a37c6427ef90100e871a257
Author: Hong Xu <h...@topbug.net>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    counsel.el (counsel-cd): Fix for counsel-ag
    
    Fix (completely broken) `counsel-cd' for `counsel-ag'.
    
    Re #2261
---
 counsel.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 933dd33..782a801 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2844,8 +2844,7 @@ CALLER is passed to `ivy-read'."
   (let ((input ivy-text)
         (new-dir (read-directory-name "cd: ")))
     (ivy-quit-and-run
-      (let ((default-directory new-dir))
-        (funcall (ivy-state-caller ivy-last) input)))))
+      (funcall (ivy-state-caller ivy-last) input new-dir))))
 
 (cl-pushnew 'counsel-ag ivy-highlight-grep-commands)
 

Reply via email to