[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult 95fce6bb0b 1/4: Fix consult--grep-position
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult 95fce6bb0b 1/4: Fix consult--grep-position |
Date: |
Tue, 11 Oct 2022 07:57:33 -0400 (EDT) |
branch: externals/consult
commit 95fce6bb0b61cc9077a333439cf5288fb2969ea5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Fix consult--grep-position
---
consult.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/consult.el b/consult.el
index 4b21e83646..5f7cd8463e 100644
--- a/consult.el
+++ b/consult.el
@@ -4408,10 +4408,10 @@ FIND-FILE is the file open function, defaulting to
`find-file'."
(matches (consult--point-placement cand (1+ line-end)))
(file (substring-no-properties cand 0 file-end))
(line (string-to-number (substring-no-properties cand (+ 1
file-end) line-end))))
- (cons
- (consult--position-marker (funcall (or find-file #'find-file) file)
- line (or (car matches) 0))
- (cdr matches)))))
+ (when-let (pos (consult--position-marker
+ (funcall (or find-file #'find-file) file)
+ line (or (car matches) 0)))
+ (cons pos (cdr matches))))))
(defun consult--grep-state ()
"Grep state function."