[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 0f905a6c62 3/3: Revert "Ensure to not collect nil can
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 0f905a6c62 3/3: Revert "Ensure to not collect nil candidates in helm-occur-transformer" |
Date: |
Tue, 28 Jun 2022 03:58:44 -0400 (EDT) |
branch: elpa/helm
commit 0f905a6c626de2fd103dac699afcd252e43b1161
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Revert "Ensure to not collect nil candidates in helm-occur-transformer"
This reverts commit 187e358493a598607d11648d76c92850bc9d69f3.
---
helm-occur.el | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/helm-occur.el b/helm-occur.el
index 9fccfcdd96..365b3b03fb 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -252,22 +252,17 @@ 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
- 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))
+ 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))))))
(defclass helm-moccur-class (helm-source-in-buffer)
((buffer-name :initarg :buffer-name