Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/views/documentSymbolNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class DocumentSymbolNode extends BaseSymbolNode {
}

protected get range(): Range {
return (<DocumentSymbol>this.symbolInfo).range;
// Using `selectionRange` instead of `range` to make sure the cursor will be pointing to the codes, not the comments
return (<DocumentSymbol>this.symbolInfo).selectionRange;
}
}