[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult a924b3b0d9 2/2: consult--source-project-buffer:
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult a924b3b0d9 2/2: consult--source-project-buffer: No fallback to all buffers outside of project (Fix #551) |
Date: |
Sat, 16 Apr 2022 15:57:24 -0400 (EDT) |
branch: externals/consult
commit a924b3b0d943d12c71d23964da7733251f4705b2
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
consult--source-project-buffer: No fallback to all buffers outside of
project (Fix #551)
---
consult.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/consult.el b/consult.el
index 8d981f29fc..f8b8878469 100644
--- a/consult.el
+++ b/consult.el
@@ -4175,9 +4175,10 @@ If NORECORD is non-nil, do not record the buffer switch
in the buffer list."
:enabled ,(lambda () consult-project-function)
:items
,(lambda ()
- (consult--buffer-query :sort 'visibility
- :directory 'project
- :as #'buffer-name)))
+ (when-let (root (consult--project-root))
+ (consult--buffer-query :sort 'visibility
+ :directory root
+ :as #'buffer-name))))
"Project buffer candidate source for `consult-buffer'.")
(defvar consult--source-project-recent-file