Commit a1301d9
Fix getVisualListRange to use GetStartOfNode like TypeScript
Changed getVisualListRange to use astnav.GetStartOfNode() instead of next.Pos()
to match TypeScript's getStart(sourceFile) behavior, which skips trivia.
This fixes the range calculation from (13, 13) to the correct value by properly
handling leading whitespace/trivia before the next token.
Based on analysis by @andrewbranch comparing against TypeScript reference
implementation in smartIndenter.ts.
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>1 parent 497174d commit a1301d9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
0 commit comments