Re: How does KDevelop's quick open match names??
Milian Wolff <[email protected]>
| Newsgroups | gmane.comp.kde.users.kdevelop |
|---|---|
| Message-ID | <170304133.p6RdfGUQkc@agathebauer> |
On Freitag, 20. Juli 2018 20:22:23 CEST Matthew Woehlke wrote: > Okay, this has been bothering me for some time. Can someone explain the > logic behind how Quick Open decides what it thinks you want to open? In > particular, can someone explain why it "prefers" more distant matches, > at least when typing file names? > > See attached example. I've typed "options.p", which Quick Open thinks is > a better match for "options_for_QT.cpp", which is a "split" match (if I > divide the input string into three parts, each part matches, in order) > than for "make_options.py", an exact substring match. > > I notice this almost constantly; given an input like "abc", Quick Open > almost always "prefers" matches like "qabdcx" (that only match when > additional text is inserted e.g. between 'b' and 'c') over a match like > "abc.x" that not only contains, but *starts with*, the exact string > "abc". Why is this? I've worked on this "recently". Fixing your situation should certainly be possible. I think it behaves as-is simply because we developers weren't bothered by this specific quirk yet. Personally, I hacked the quickopen matching algorithm a couple of months ago only because the path/file naming convention in a new project I was working on triggered some corner cases I didn't see before. I think your case is another such case. Note that the quickopen code base is very well unit tested. Meaning: try to look at the unit tests, extend the code to add a (failing) test for your situation. Then either also start to change the code to fix the test, or at least send in this new unit test code to quickstart the work for others (me?). Cheers -- Milian Wolff [email protected] http://milianw.de
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAltXjb8ACgkQ8zYW/HGd OX/YRxAAmVAhNzOn3qA60wi8XOHuzJqAr2mSpN/iYCcenY4yGJbvMg7RI6M6hjIV Ivkn/GhxyMSNiat/euPwM6GSOTBtgMoLlBr4/DyQydkQsSg2KDmOY6p+7r9RlCYN D3vruCF8HPgfkqFjOIsV+omaLo1ve7mOq9cl+AvlRqctsKiuJ6xvSlZL2vs06tLS paLM4jcOa4jviT4X+bJoRl+ZygN3D4aiaRXv+hwS7HpI8ZAKTdUQs8v9xeSc1lBt 6Kon+m3o1382m4L4MZRBaJp7F/yvN8ZiDcN81dlH7iQVQR+q9PdTZeWj2MADpitV lhFHVnN3pRTJHeO8yxtCSbQhYclFz8BH5GPKYZ6stRJzYLBD3QUNpxX+2Q49ej2m awifUjmRNNRTrJTTrtR+yZA45oWxt0UX2IJW2P75xL63FrA1XAC4XHYUkbj57Zx5 7bIMBgVGpf9pBqaxHH68PxJSJDyTnJHpUJELpARZse7v/g7O21SGZ/UByFxd7fzH 9mKsvmKja99xyYoUAWrMLUwshv3Tvmcaf1W9CmkS0adCt4IklEzkOhmBXPi81Gjp 0DVSAvWd8s+mWSpfDt2o9R7m7OusIz7vZklIO00Rbk94eSS78MtRg1Cx5Inqvtc8 ixH0I8fWQSJETZ01t1EWinzzK/nQYETOfWb04a/Ck2wD0CpEyzA= =fdZG -----END PGP SIGNATURE-----