Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

nbarrientos
Copy link
Contributor

@nbarrientos nbarrientos commented Oct 24, 2022

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
Copy link

coveralls commented Oct 24, 2022

Coverage Status

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

@nbarrientos nbarrientos force-pushed the imenu_skip branch 2 times, most recently from 151684f to 5dcafd1 Compare October 24, 2022 12:01
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.
@nbarrientos nbarrientos force-pushed the imenu_skip branch 2 times, most recently from a5033fa to 715fe33 Compare October 24, 2022 12:16
@dajva dajva merged commit 3880e8c into dajva:master Oct 24, 2022
@dajva
Copy link
Owner

dajva commented Oct 24, 2022

Looks good. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants