Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion AutoDoxyDoc/DoxygenCompletionCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,20 @@ private void NewCommentLine(string currentLine)
int oldOffset = ts.ActivePoint.LineCharOffset;
int extraIndent = 0;

while (!currentLine.StartsWith("/*!"))
while (!currentLine.StartsWith("/*"))
{
if (m_regexTagSection.IsMatch(currentLine))
{
extraIndent = m_configService.Config.TagIndentation;
break;
}

// protect from infinite loop when we reach the top of the document an end of comment
// the NewCommentLine() call is protected with a weak IsInsideComment() check
// that could be flawed with lines like: *pointer = value;
if (ts.ActivePoint.Line <= 1 || currentLine.Contains("*/"))
return;

ts.LineUp();
currentLine = ts.ActivePoint.CreateEditPoint().GetLines(ts.ActivePoint.Line, ts.ActivePoint.Line + 1);
currentLine = currentLine.TrimStart();
Expand Down