[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 187e358493 1/6: Ensure to not collect nil candidates
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 187e358493 1/6: Ensure to not collect nil candidates in helm-occur-transformer |
Date: |
Thu, 12 May 2022 04:58:30 -0400 (EDT) |
branch: elpa/helm
commit 187e358493a598607d11648d76c92850bc9d69f3
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Ensure to not collect nil candidates in helm-occur-transformer
---
helm-occur.el | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/helm-occur.el b/helm-occur.el
index f9691b1b7d..7880df5e7f 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -247,17 +247,22 @@ engine beeing completely different and also much faster."
(defun helm-occur-transformer (candidates source)
"Return CANDIDATES prefixed with line number."
(cl-loop with buf = (helm-get-attr 'buffer-name source)
- for c in candidates collect
- (when (string-match helm-occur--search-buffer-regexp c)
- (let ((linum (match-string 1 c))
- (disp (match-string 2 c)))
- (cons (format "%s:%s"
- (propertize
- linum 'face 'helm-grep-lineno
- 'help-echo (buffer-file-name
- (get-buffer buf)))
- disp)
- (string-to-number linum))))))
+ for c in candidates
+ for cand = (when (string-match helm-occur--search-buffer-regexp c)
+ (let ((linum (match-string 1 c))
+ (disp (match-string 2 c)))
+ (when (and disp (not (string= disp "")))
+ (cons (concat
+ (propertize " " 'display
+ (concat
+ (propertize
+ linum 'face 'helm-grep-lineno
+ 'help-echo (buffer-file-name
+ (get-buffer buf)))
+ ":"))
+ disp)
+ (string-to-number linum)))))
+ when cand collect cand))
(defclass helm-moccur-class (helm-source-in-buffer)
((buffer-name :initarg :buffer-name
- [nongnu] elpa/helm updated (ec76b7d0ff -> 737ce8e263), ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 4f0066ac3b 2/6: Implement diacritics for in buffer sources, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 80a37c6d5e 5/6: Add a variable to controls diacritics usage in helm-occur, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 737ce8e263 6/6: Update helm-source docstring, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm b7b21b5733 4/6: Add docstring to helm-source-mm-get-search-or-match-fns, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm a315920e11 3/6: Fix helm-mm-regexp-p and helm-mm-diacritics-string-match for searching match-parts, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 187e358493 1/6: Ensure to not collect nil candidates in helm-occur-transformer,
ELPA Syncer <=