Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzzy match matches helper messages #49

Open
kurnevsky opened this issue Mar 1, 2019 · 3 comments
Open

Fuzzy match matches helper messages #49

kurnevsky opened this issue Mar 1, 2019 · 3 comments

Comments

@kurnevsky
Copy link
Contributor

kurnevsky commented Mar 1, 2019

See the screenshot where the matching for 't' and 's' letters is displayed (with ivy--regex-fuzzy):

screenshot-2019-03-01-23 04 38

@kurnevsky
Copy link
Contributor Author

Can be fixed with a dirty hack:

(advice-add 'ivy--highlight-fuzzy :around (lambda (orig-fun &rest args)
                                            (let* ((cols (split-string (car args) (char-to-string #x200B)))
                                                    (res (apply orig-fun (list (car cols)))))
                                              (mapconcat 'identity (cons res (cdr cols)) ""))))

(advice-add 'ivy-rich-normailze-width :around (lambda (orig-fun &rest args)
                                                (pcase args
                                                  (`(,str ,len ,left)
                                                    (apply orig-fun (list (concat str (char-to-string #x200B)) (1+ len) left))))))

@Yevgnen
Copy link
Owner

Yevgnen commented Mar 16, 2019

Sorry for late reply and I currently can not find a elegant fix to this...

@kurnevsky
Copy link
Contributor Author

Reported to ivy repo because it happens with counsel as well: abo-abo/swiper#1969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants