Skip to content

Commit 956389a

Browse files
Update codeActions.ts
Co-authored-by: Sanjula Ganepola <[email protected]>
1 parent c9c37c8 commit 956389a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extension/server/src/providers/codeActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function getBodyRangeForRange(docs: Cache, rangeStart: number, rangeEnd: number,
9292
} else {
9393
validStart = docs.getDefinitionBlockEnd(document.uri) + 1;
9494
const firstProc = docs.procedures.find(p => !Object.keys(p.keyword).some(k => k.toLowerCase().startsWith(`ext`)));
95-
validEnd = firstProc && firstProc.range.start ? firstProc.range.start - 1 : document.lineCount;
95+
validEnd = firstProc && firstProc.range.start ? firstProc.range.start - 1 : document.lineCount - 1;
9696
}
9797

9898
if (validStart < 0 || validEnd < 0) {

0 commit comments

Comments
 (0)