dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
480 stars 41 forks source link

Fix "File: " skipping when building the elements of the imenu #145

Closed nbarrientos closed 1 year ago

nbarrientos commented 1 year ago

We shouldn't be using skip-chars-forward here as this function skips over any character set passed as argument, not just a string.

Without this patch, for instance entries like:

File: lol/foo.bar

Will be added to the candidates list as "ol/foo.bar" as ?l is in the character set "File: ".

Instead, just skips 6 chars forward.

Sorry for this, I should have read the documentation of the function instead of just relying on the name grins. I've added an integration test to make this (hopefully) regression-proof.

coveralls commented 1 year ago

Coverage Status

Coverage increased (+1.5%) to 82.583% when pulling 715fe3352600bd1f7863fb57358ef2e294fe9494 on nbarrientos:imenu_skip into 51596cb516d7af1737d964ffdbb4c4d416d6dfaf on dajva:master.

dajva commented 1 year ago

Looks good. Thanks a lot.