From fa23a912de621f01a91628e9fee901e454c4a488 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Mar 2020 02:29:22 -0400 Subject: [PATCH] Fix #2778: +ivy/projectile-find-file hangs in / --- modules/completion/ivy/autoload/ivy.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 3c34ae2c8..f646469af 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -207,8 +207,8 @@ If ARG (universal argument), open selection in other-window." ;;;###autoload (defun +ivy/projectile-find-file () "A more sensible `counsel-projectile-find-file', which will revert to -`counsel-find-file' if invoked from $HOME, `counsel-file-jump' if invoked from a -non-project, `projectile-find-file' if in a big project (more than +`counsel-find-file' if invoked from $HOME or /, `counsel-file-jump' if invoked +from a non-project, `projectile-find-file' if in a big project (more than `ivy-sort-max-size' files), or `counsel-projectile-find-file' otherwise. The point of this is to avoid Emacs locking up indexing massive file trees." @@ -219,6 +219,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (let ((this-command 'counsel-find-file)) (call-interactively (cond ((or (file-equal-p default-directory "~") + (file-equal-p default-directory "/") (when-let (proot (doom-project-root)) (file-equal-p proot "~"))) #'counsel-find-file)