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

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

[elpa] externals/ivy-hydra fc2801f 367/395: `counsel-find-file': open fi


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra fc2801f 367/395: `counsel-find-file': open file in foreground
Date: Thu, 25 Feb 2021 08:32:40 -0500 (EST)

branch: externals/ivy-hydra
commit fc2801f02d1c21e530167f822112caf7d2e98c85
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    `counsel-find-file': open file in foreground
    
    `counsel-find-file-action' calls `find-file' wrapped in
    `with-ivy-window', which causes the file to be opened in the `ivy'
    window, which is destroyed afterwards.  This causes the file to be
    opened in the background.  Unwrap the body from `with-ivy-window',
    since that isn't needed, fixing the bug.
    
    Copyright-paperwork-exempt: yes
    
    Closes #2752.
---
 counsel.el | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/counsel.el b/counsel.el
index 0e6a26f..51c283e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1986,15 +1986,14 @@ Skip some dotfiles unless `ivy-text' requires them."
 
 (defun counsel-find-file-action (x)
   "Find file X."
-  (with-ivy-window
-    (cond ((and counsel-find-file-speedup-remote
-                (file-remote-p ivy--directory))
-           (let ((find-file-hook nil))
-             (find-file (expand-file-name x ivy--directory))))
-          ((member (file-name-extension x) counsel-find-file-extern-extensions)
-           (counsel-find-file-extern x))
-          (t
-           (find-file (expand-file-name x ivy--directory))))))
+  (cond ((and counsel-find-file-speedup-remote
+              (file-remote-p ivy--directory))
+         (let ((find-file-hook nil))
+           (find-file (expand-file-name x ivy--directory))))
+        ((member (file-name-extension x) counsel-find-file-extern-extensions)
+         (counsel-find-file-extern x))
+        (t
+         (find-file (expand-file-name x ivy--directory)))))
 
 (defun counsel--preselect-file ()
   "Return candidate to preselect during filename completion.



reply via email to

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