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 3c29bf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion support/vscode/koka.language-koka/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,12 @@ class MainCodeLensProvider implements vscode.CodeLensProvider {
const doc = document.getText()
const main = doc.indexOf('\nfun main')
if (main < 0){
if (doc.startsWith('fun main')){
return [this.createCodeLens(document, 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 3c29bf0

Please sign in to comment.