branch: externals/company
commit 65d1947e348a40dc34fabae0595315a856a8196d
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    company-search-flex-regexp: Highlight the chars separately
---
 company.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 69582bd080..ee07a64550 100644
--- a/company.el
+++ b/company.el
@@ -2799,10 +2799,11 @@ each one wraps a part of the input string."
 (defun company-search-flex-regexp (input)
   (if (zerop (length input))
       ""
-    (concat (regexp-quote (string (aref input 0)))
+    (concat (format "\\(%s\\)" (regexp-quote (string (aref input 0))))
             (mapconcat (lambda (c)
                          (concat "[^" (string c) "]*"
-                                 (regexp-quote (string c))))
+                                 (format "\\(%s\\)"
+                                         (regexp-quote (string c)))))
                        (substring input 1) ""))))
 
 (defun company--permutations (lst)

Reply via email to