[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm c8e64218f6 1/2: Fix highlighting matches in HFF when
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm c8e64218f6 1/2: Fix highlighting matches in HFF when switching to action menu |
Date: |
Wed, 26 Oct 2022 14:59:06 -0400 (EDT) |
branch: elpa/helm
commit c8e64218f679d25f8070e5821f995a48df50d71f
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix highlighting matches in HFF when switching to action menu
When action menu popup we are no more in file completion.
---
helm-core.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/helm-core.el b/helm-core.el
index 5b702bd40e..462778ad63 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -4594,7 +4594,8 @@ useful when the order of the candidates is meaningful,
e.g. with
;; FIXME: This may be wrong when match-on-real
;; is nil, so we should flag match-on-real on
;; top and use it.
- (file-comp (file-name-nondirectory (or host real
display)))))
+ (file-comp (file-name-nondirectory
+ (or host (and (stringp real) real)
display)))))
(count 0)
beg-str end-str)
(when host (setq pattern (cadr (split-string pattern ":"))))
@@ -4668,13 +4669,14 @@ The filtered-candidate-transformer function to
highlight fuzzy matches.
See `helm-fuzzy-default-highlight-match'."
(cl-assert helm-fuzzy-matching-highlight-fn nil "Wrong type argument
functionp: nil")
(cl-loop with diac = (helm-get-attr 'diacritics source)
- with file-comp-p = (or minibuffer-completing-file-name
- (helm-guess-filename-at-point))
+ with file-comp-p = (and (not (helm-action-window))
+ (or minibuffer-completing-file-name
+ (helm-guess-filename-at-point)))
;; helm-pattern may have been modified (fuzzy) so ensure to
;; use helm-input which is the raw pattern.
with pattern = (if file-comp-p
(file-name-nondirectory helm-input)
- helm-input)
+ helm-pattern)
when (string= pattern "") return candidates
for c in candidates
collect (funcall helm-fuzzy-matching-highlight-fn c pattern diac
file-comp-p)))