Closed iw-kuchin closed 11 years ago
Yes, this is known issue. When talking about fuzzy matching it's hard to make highlighting that will be correct it all cases. I dont like usual ctrlp highlighting ( e.g. in your example try search for texx
with default ctrlp matcher, it will highlight text.tx
) so I made it to highlight all symbols. I'll try to look into this further.
Thanks for quick response.
Highlighting propsed by you doesn't allow to quickly understand where match actually occured. Provided example is very simple, but in actual projects there could be 4-5 levels of directory hierarchy with not-so-short names. When I do fuzzy search I want to check if search really found what I needed. When half of string is highlighted it's a bit difficult. And this in some way contradicts the purpose of fuzzy search: to find something quickly.
After some thinking: as an alternative to both ctrlp
and ctrlp-matcher
one can use highlighting where only matching symbols would be highlighted in order of appearance. I.e. for example with text.txt
and texx
it would be text.t xt. This variant is more "honest" than ctrlp
's and produces less visual noise than yours.
Thanks a lot for fixing. Current master won't compile though, semicolon is missing in .c file on line 41. After adding it all compiles and works (compiler still issues some warnings). Again, many thanks for patch.
Bah, sorry about that. Should be fixed now.
ctrlp-matcher
highlights all found symbols in string instead of correct match only. It leads to some confusion. Minimal example to repoduce (NERDTree snapshot):Now, open
ololo.tst
and try to search fortext
.ctrlp
highlights onlytext
part fromet/tx/text.txt
.ctrlp-matcher
instead highlights all characters except slashes.