Skip to content

completion: Fix only start chars of items are matched

Waqar Ahmed requested to merge work/completion-matching into kf5

The current matching algorithm fails if the "filter"

  • isn't at the start
  • will do fuzzy matching ONLY IF the first char of "filter" == first char of the item being matched.

This strategy filters out some really valid completions resulting in annoyance. E.g.,:

include "MyFile/Fil[CURSOR]"

In the above case, assume the filter is "Fil" and the completion is "MyFile/Fil". The completion will get filtered out even though we have a valid match.

With this change, we also do "contains" matching so that if a completion item contains the filter exactly, it shows up in the list

Edited by Waqar Ahmed

Merge request reports

Loading