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 link highlighting in \ref and \input for non-word characters #4448

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

v4hn
Copy link
Contributor

@v4hn v4hn commented Oct 25, 2024

code version 1.26 (2018) added support for custom symbol selection range through DefinitionLink when providing definitions. The feature was missed in the previous discussion.

Making use of the interface we don't get unexpected splits of symbols in words anymore.

Fixes #4446 and #3312 .

Before

Word-chunked Link Decoration

After

Correct Link Decoration

@James-Yu
Copy link
Owner

Thanks for your contribution!

@jlelong I really cannot recall the implementations on symbol definitions. The modifications look good to me at first sight. May you take a look on them? Many thanks!

@James-Yu James-Yu requested a review from jlelong October 25, 2024 15:47
@James-Yu
Copy link
Owner

@v4hn Thank you for your contribution. May I ask you to add comments to explain the meaning/content of variables and describe the logic for future maintenance?

@jlelong
Copy link
Collaborator

jlelong commented Oct 27, 2024

Thanks for your contribution!

@jlelong I really cannot recall the implementations on symbol definitions. The modifications look good to me at first sight. May you take a look on them? Many thanks!

For sure. I will on Tuesday. I am away from my computer for two days.

@v4hn v4hn force-pushed the pr-fix-broken-symbol-decoration branch from a01e6ac to 344a373 Compare October 28, 2024 09:19
@v4hn
Copy link
Contributor Author

v4hn commented Oct 28, 2024

May I ask you to add comments to explain the meaning/content of variables and describe the logic for future maintenance?

Done

code version 1.26 (2018) added support for custom symbol selection
range through DefinitionLink when providing definitions:
https://code.visualstudio.com/updates/v1_26#_definitionlink

Making use of the interface we don't get unexpected splits of symbols in words anymore.
E.g., before `\ref{fig:abc}` would turn only "fig" or "abc" into a link
when hovering over it with `<Ctrl>` held.

Also addresses the same problem with file names in `\input{abc_def}`.
@v4hn v4hn force-pushed the pr-fix-broken-symbol-decoration branch from 344a373 to a177a16 Compare October 28, 2024 09:21
@v4hn
Copy link
Contributor Author

v4hn commented Nov 4, 2024

Gentle ping?

@jlelong jlelong merged commit b797c80 into James-Yu:master Nov 4, 2024
4 of 7 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\ref link highlighting breaks at some valid characters
3 participants