Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit f6a8d93

Browse files
committed
fix: use correct line number in getCodeElementsInRange
getCodeElementsInRange would always return the first element
1 parent 208b7b8 commit f6a8d93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/token_position.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export const getCodeElementsInRange = ({
317317

318318
const elements: { line: number; element: HTMLElement }[] = []
319319
for (let line = position.line; line <= (position.endLine || position.line); line++) {
320-
const element = getCodeElementFromLineNumber(codeView, position.line, part)
320+
const element = getCodeElementFromLineNumber(codeView, line, part)
321321
if (!element) {
322322
break
323323
}

0 commit comments

Comments
 (0)