diff --git a/src/editor/codelens.ts b/src/editor/codelens.ts index 28ab9d4..05eac39 100644 --- a/src/editor/codelens.ts +++ b/src/editor/codelens.ts @@ -50,6 +50,7 @@ export class CodeLensStepsProvider implements CodeLensProvider { for (const [idx, pathItem] of fullPath.entries()) { if (pathItem.file.original_path !== document.uri.fsPath) { + previousJumpIdx = idx; continue; } @@ -90,10 +91,10 @@ export class CodeLensStepsProvider implements CodeLensProvider { previousJumpIdx ] })); - - previousJumpIdx = idx; } + previousJumpIdx = idx; + if (idx < fullPath.length - 1) { codeLenses.push(new CodeLens(range, { 'title': 'Next step',