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

Fixed highligting during scrolling when comment row ends with */ #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mirao
Copy link

@mirao mirao commented Mar 30, 2022

If you run cargo run ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs and scroll to (or find) the string /* INVARIANT

you get incorrectly parsed comments:

image

The check of */ should produce return false, because ending */ means that multiple line comment is ended and doesn't continue on next line.

Actually I've found out that it's not needed to test multiline comments at all if row is already highlighted and just return false in all cases.
Then it works well (and editor is still fast and without issues, at least I didn't find any):

image

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

1 participant