[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 5e7c9a7920: Make the regexp matching last HFF candida
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 5e7c9a7920: Make the regexp matching last HFF candidate configurable |
Date: |
Mon, 21 Feb 2022 14:58:21 -0500 (EST) |
branch: elpa/helm
commit 5e7c9a79207fdd878212b6ec6c989a40b1014d18
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Make the regexp matching last HFF candidate configurable
It is the regexp used when going up one level (i.e. <left> or C-l).
The default value allows matching a possible unicode char at bol.
---
helm-files.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/helm-files.el b/helm-files.el
index 0b009c0155..cf423b6bc4 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -804,6 +804,12 @@ when moving out of directory when non nil."
"A list of eshell aliases to not display."
:type '(repeat string)
:group 'helm-files)
+
+(defvar helm-ff-last-expanded-candidate-regexp "^[[:multibyte:]]? ?%s$"
+ "Regexp that retrieve previous candidate when going up one level.
+The default value matching a multibyte char at bol allows prefixing
+candidate with an icon. The format part will be replaced by the
+display part of the candidate regexp quoted.")
;; Internal.
(defvar helm-find-files-doc-header "
(\\<helm-find-files-map>\\[helm-find-files-up-one-level]: Go up one level)"
@@ -2745,7 +2751,10 @@ hitting C-j on \"..\"."
(directory-file-name helm-ff-last-expanded))
(directory-file-name helm-ff-last-expanded))))
(with-helm-window
- (when (re-search-forward (concat "^" (regexp-quote presel) "$") nil t)
+ (when (re-search-forward
+ (format helm-ff-last-expanded-candidate-regexp
+ (regexp-quote presel))
+ nil t)
(forward-line 0)
(helm-mark-current-line)))
(setq helm-ff-last-expanded nil))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm 5e7c9a7920: Make the regexp matching last HFF candidate configurable,
ELPA Syncer <=