-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Consider the following snippet:
public class Foo
{
void Bar()
{
#pragma warning disable CS0000 // Internal compiler error
var x = Baz(1, 2, 3, out object error);
#pragma warning restore CS0000 // Internal compiler error
}
}
We have a preprocessor directive, a line comment on the same line, and some code right on the next line (not very unusual in real-world code). The line after the directive gets weirdly highlighted:

This does not happen we remove the line comment, or add a blank line or block comment after the directive. It also happens if we add some more line comments in the lines between the directive and the code.
From what I saw, the whole line belongs to textmate scopes meta.preprocessor.cs, source.cs
. Maybe that happens because the line comment consumes the end of line, and the directive cannot match (?<=$)
?
Metadata
Metadata
Assignees
Labels
No labels