ivy-rich icon indicating copy to clipboard operation
ivy-rich copied to clipboard

Fuzzy match matches helper messages

Open kurnevsky opened this issue 5 years ago • 3 comments

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 avatar Mar 01 '19 20:03 kurnevsky

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))))))

kurnevsky avatar Mar 15 '19 18:03 kurnevsky

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

Yevgnen avatar Mar 16 '19 02:03 Yevgnen

Reported to ivy repo because it happens with counsel as well: https://github.com/abo-abo/swiper/issues/1969

kurnevsky avatar Mar 16 '19 13:03 kurnevsky