[Github-comments] [geany/geany] Improve goto-symbols popup (#1445)

Thomas Martitz notifications at xxxxx
Fri Nov 16 06:48:06 UTC 2018


 >
 > path     current result     my expectation
 > |/src/a/app-1.2.3/src/lib/module/source.c|
 > |a/app-1.2.3/src/lib/module/source.c| |a/app-1.2.3/src/lib/.../source.c|
 > |/src/b/app-2.2.3/src/module/source.c|
 > |b/app-2.2.3/src/module/source.c| |b/app-2.2.3/src/.../source.c|
 >

Damn. What happens is that the code determines `.2.3/src/` to be the 
longest common substring (longer that the expected `/module/`). Then
it reduces it to directory components, giving only `src`. This
is shorter than the threshold of 5 chars, so in the end nothing is 
ellipsized. It works if you change /module/ to /moduleXX/.

Fixing this isn't trivial, and without proper unit tests there is a risk 
to break previously working cases.

I suggest to accept the behavior for now (and merge) and I'll follow up 
with a fix + unit tests. But I would hate if this doesn't make it into 
the release just because of select (edge) cases because the status quo 
is just plain unusable for me. In fact I've been using this patch at 
work for ages where I have real-world cases and I never came across 
issues like this.

Thanks for looking into it again!



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1445#issuecomment-439298755
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20181115/a82ca340/attachment-0001.html>


More information about the Github-comments mailing list