Skip to content

Commit

Permalink
LSP: fix "documentSymbol failed" error. (#5842)
Browse files Browse the repository at this point in the history
  • Loading branch information
csyonghe authored Dec 12, 2024
1 parent 1f3be30 commit 2999cb7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/slang/slang-language-server-document-symbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ static void _getDocumentSymbolsImpl(
sym.range.end.line = (int)line;
sym.range.end.character = (int)col;
}
if (sym.selectionRange.end.line == sym.range.end.line ||
sym.selectionRange.end.character >= sym.range.end.character)
{
sym.selectionRange.end = sym.range.end;
}
}
if (const auto childContainerDecl = as<ContainerDecl>(child))
{
Expand Down

0 comments on commit 2999cb7

Please sign in to comment.