branch: elpa/hyperdrive
commit 59b7dcf10b802f595c58be9301d923b28fb5123c
Author: Adam Porter <[email protected]>
Commit: Adam Porter <[email protected]>
Fix: (h//find-buffer-visiting) Take first buffer
---
hyperdrive-lib.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index b795b34ed0..48dd158378 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1556,11 +1556,12 @@ Affected by option `hyperdrive-reuse-buffers', which
see."
(defun h//find-buffer-visiting (entry)
"Return a buffer visiting ENTRY, or nil if none exist."
- (match-buffers
- (lambda (buffer)
- (and-let* ((local-entry
- (buffer-local-value 'hyperdrive-current-entry buffer)))
- (he/equal-p entry local-entry)))))
+ ;; If `match-buffers' returns more than one buffer, we ignore the others.
+ (car (match-buffers
+ (lambda (buffer)
+ (and-let* ((local-entry
+ (buffer-local-value 'hyperdrive-current-entry buffer)))
+ (he/equal-p entry local-entry))))))
(defun h//format-entry (entry &optional format formats)
"Return ENTRY formatted according to FORMAT.