Skip to content

Commit 3e9b3ef

Browse files
committed
fix: fix function bloclk content incorrect while reading by lines
1 parent 82d5719 commit 3e9b3ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/function_change/diff.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function getFileLinesString (filePath: string, start: number, end: number): stri
4242
let line = liner.next();
4343

4444
while (line) {
45-
if (lineNumber >= start && lineNumber <= end) {
45+
if (lineNumber >= (start - 1) && lineNumber <= (end - 1)) {
4646
result.push(line.toString());
4747
}
4848

0 commit comments

Comments
 (0)