Describe the bug
For file relations that highlight only 1 line of source code, code navigation in the source file view doesn't work. Clicking the node in the left toc side panel causes JS exception Uncaught TypeError when when changeActive() tries to access this.ranges[rangeAlias]?.banner .
To Reproduce
Use forward relations to link to a 1-line function definition.
sdoc
[REQUIREMENT]
UID: REQ-1
TITLE: Requirement Title #1
STATEMENT: Requirement Statement #1
RELATIONS:
- TYPE: File
VALUE: file.c
FUNCTION: f1
- TYPE: File
VALUE: file.c
FUNCTION: f2
file.c (note how fn2 spans only 1 line)
void fn1() {
}
void fn2() {}
Go to file.c source view and click fn2.
Expected behavior and additional context
1-line definitions are not uncommon, in particular in the Rust case where I'll enable to forward link not only to functions, but to any identifier like struct Pair(i32, f32);. They shouldn't cause problems.