Skip to content

Commit

Permalink
update extension
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWhiting committed Aug 28, 2023
1 parent 3bfe022 commit 9d31d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions support/vscode/koka.language-koka/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ class MainCodeLensProvider implements vscode.CodeLensProvider {
public async provideCodeLenses(document: TextDocument, token: CancellationToken): Promise<CodeLens[] | undefined> {
const doc = document.getText()
const main = doc.indexOf('\nfun main')
if (main < 0){
if (main <= 0){
return []
}
return [this.createCodeLens(document, main)]
return [this.createCodeLens(document, main+1)]
}

private createCodeLens(document: TextDocument, offset: number): CodeLens {
Expand Down

0 comments on commit 9d31d31

Please sign in to comment.