[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx 78dc69a666 023/182: fix query with CAPITAL letters
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx 78dc69a666 023/182: fix query with CAPITAL letters |
Date: |
Tue, 13 Dec 2022 03:59:17 -0500 (EST) |
branch: elpa/flx
commit 78dc69a66622579206bf6c6163b67300562fb12d
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
fix query with CAPITAL letters
---
flx.el | 3 ++-
tests/flx-test.el | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/flx.el b/flx.el
index 350adf8fb5..7d429c1d37 100644
--- a/flx.el
+++ b/flx.el
@@ -13,7 +13,7 @@
;; Version: 0.1
;; Last-Updated:
;; By:
-;; Update #: 3
+;; Update #: 4
;; URL:
;; Keywords:
;; Compatibility:
@@ -279,6 +279,7 @@ e.g. (\"aab\" \"ab\") returns
(defun flx-score (str query &optional cache)
"return best score matching QUERY against STR"
+ (setq query (downcase query))
(unless (or (zerop (length query))
(zerop (length str)))
(let* ((info-hash (flx-process-cache str cache))
diff --git a/tests/flx-test.el b/tests/flx-test.el
index eace83870a..73b30b6fb1 100644
--- a/tests/flx-test.el
+++ b/tests/flx-test.el
@@ -13,7 +13,7 @@
;; Version: 0.1
;; Last-Updated:
;; By:
-;; Update #: 2
+;; Update #: 4
;; URL:
;; Keywords:
;; Compatibility:
@@ -157,6 +157,10 @@
".")))
+(ert-deftest flx-score-capital ()
+ "QUERY should be downcased."
+ (should (flx-score "abc" "A" (flx-make-filename-cache))))
+
(ert-deftest flx-score-string ()
"score as string"
(let ((string-as-path-score (flx-score "a/b" "a" (flx-make-string-cache)))
- [nongnu] elpa/flx b322b72d7b 131/182: async comes from melpa, (continued)
- [nongnu] elpa/flx b322b72d7b 131/182: async comes from melpa, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 551b095274 130/182: fix travis cask path, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 26a1225431 137/182: rename optimization test, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7a2601481c 142/182: Simplify flx-propertize, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx b95294518c 155/182: Debian and Ubuntu installation instructions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 46040d0b09 160/182: Merge pull request #97 from antmak/patch-1, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 05600ff855 167/182: Merge pull request #103 from phst/add-license-file, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx e3b3f0533e 174/182: Merge pull request #108 from tarsiiformes/cleanup, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 48e10bf54f 177/182: Update to latest version of GPLv3 boilerplate, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8ee8a877ab 028/182: boost entire match score, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 78dc69a666 023/182: fix query with CAPITAL letters,
ELPA Syncer <=
- [nongnu] elpa/flx 095f2e70f9 040/182: remove text property of selected item, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 50ff90fa08 017/182: add ido cache of narrowed list optimization, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3208d8131e 043/182: make undecorate select item more thorough, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx fb1ded43df 044/182: cache cons cell lists too, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx d21ac098df 050/182: add option `flx-ido-use-faces', ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f9bd16221b 063/182: update large collection guidelines, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 27bc47899a 075/182: Merge pull request #37 from artagnon/make, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx abe1a77c02 081/182: Merge pull request #38 from artagnon/cl-lib, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 9200e27309 083/182: use "flex" filtering when collection too large, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx c85273a6e8 009/182: fix helm demo typo, ELPA Syncer, 2022/12/13