branch: elpa/flx commit 095f2e70f997db6872de47e85f4a5f899cc9d7a7 Author: Le Wang <le.w...@agworld.com.au> Commit: Le Wang <le.w...@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"