emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/flx 095f2e70f9 040/182: remove text property of selected i


From: ELPA Syncer
Subject: [nongnu] elpa/flx 095f2e70f9 040/182: remove text property of selected item
Date: Tue, 13 Dec 2022 03:59:23 -0500 (EST)

branch: elpa/flx
commit 095f2e70f997db6872de47e85f4a5f899cc9d7a7
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>

    remove text property of selected item
    
    fixes #13
---
 flx-ido.el | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/flx-ido.el b/flx-ido.el
index e8596e6490..8d1f18dfc9 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -13,7 +13,7 @@
 ;; Version: 0.1
 ;; Last-Updated:
 ;;           By:
-;;     Update #: 30
+;;     Update #: 32
 ;; URL:
 ;; Keywords:
 ;; Compatibility:
@@ -171,9 +171,17 @@ item, in which case, the ending items are deleted."
 (defvar flx-ido-use t
   "Use flx matching for ido.")
 
-(defadvice ido-read-internal (before flx-ido-reset-hash activate)
-  "clear our narrowed hash."
-  (clrhash flx-ido-narrowed-matches-hash))
+(defadvice ido-read-internal (around flx-ido-reset-hash activate)
+  "Clear flx narrowed hash beforehand.
+
+Remove flx properties after."
+  (if flx-ido-use
+      (progn
+        (clrhash flx-ido-narrowed-matches-hash)
+        ad-do-it
+        (remove-text-properties 0 (length ad-return-value)
+                                '(face flx-highlight-face) ad-return-value))
+    ad-do-it))
 
 (defadvice ido-set-matches-1 (around flx-ido-set-matches-1 activate)
   "Choose between the regular ido-set-matches-1 and my-ido-fuzzy-match"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]