提交 021bac42 编写于 作者: P Paul Chen 提交者: GitHub

Take review feedback.

上级 1f449d6b
......@@ -188,17 +188,19 @@ private static bool IsCaretInsideBlockCommentSyntax(SnapshotPoint caretPosition)
// /* |EOF
if (caretPosition == snapshot.Length)
{
if (span.Length < 4) // "/**/".Length
if (span.Length < "/**/".Length)
{
return true;
}
// If the block comment is not closed, SyntaxTrivia contains diagnostics
// So when the SyntaxTrivia is clean, the block comment should be closed
if (!trivia.ContainsDiagnostics)
{
return false;
}
var textBeforeCaret = snapshot.GetText((int)caretPosition - 2, 2);
var textBeforeCaret = snapshot.GetText(caretPosition.Position - 2, 2);
return textBeforeCaret != "*/";
}
}
......@@ -206,4 +208,4 @@ private static bool IsCaretInsideBlockCommentSyntax(SnapshotPoint caretPosition)
return false;
}
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册