D11939: Prefer matches closer to the end of the path

Milian Wolff noreply at phabricator.kde.org
Wed Apr 4 23:33:53 UTC 2018


mwolff created this revision.
Restricted Application added a subscriber: kdevelop-devel.
mwolff requested review of this revision.

REVISION SUMMARY
  Working on one codebase, I regularly fail to quickly find some
  files I'm looking for because they use generic names that are also
  part of the project path. We used to match from the start and
  grouped all fuzzy matches together in the OtherMatch group, thus
  the sort order for the following files is the same for the filter
  strings "home", "sources" or "project":
  
  /home/user/sources/project/src/something_home.cpp
  /home/user/sources/project/src/something_sources.cpp
  /home/user/sources/project/src/something_project.cpp
  
  Now, we sort the OtherMatches by how close we matched towards
  the end of the path. Thus we split up the sort order for the three
  paths and the corresponding three filter strings. We will now prefer
  "something_home.cpp" for "home", "something_sources.cpp" for "sources"
  and "something_project.cpp" for "project".
  
  I could not see any noteworthy changes in the benchmark runtimes.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D11939

AFFECTED FILES
  kdevplatform/language/interfaces/abbreviations.cpp
  plugins/quickopen/tests/test_quickopen.cpp

To: mwolff
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180404/9790f048/attachment.html>


More information about the KDevelop-devel mailing list