client: For filter, prioritize exact, startsWith
authorShane Synan <digitalcircuit36939@gmail.com>
Sat, 6 Oct 2018 18:53:59 +0000 (13:53 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 14 Oct 2018 19:35:11 +0000 (21:35 +0200)
commit8a8d7e0d49f4938f672ea3a5d0c11a76ad641f52
tree660548c56b37a79e7fcddb8ed264679614ec6dc7
parente61d189229dc09fb5978a8a1bc10aed413cd4cbd
client: For filter, prioritize exact, startsWith

When filtering buffer view results, prioritize exact string matches,
then prioritize startsWith matches, both case-insensitive.  Within
these results, sort normally (e.g. alphabetical).

This gives weight to exact matches and the start of the string.  When
no filter string is specified, sorting goes back to normal.

Search string: "car"
Before:
> acar
> bcar
> careful
> caring
> racecar
> car [hidden]

After:
> car [hidden]
> careful
> caring
> acar
> bcar
> racecar

Where [hidden] represents a buffer that's temporarily or permanently
hidden.
src/uisupport/bufferviewfilter.cpp