From ef42e0114bf485f10031a5af734b3ff0e7c0b617 Mon Sep 17 00:00:00 2001 From: Discookie Date: Fri, 21 Jan 2022 06:17:42 +0100 Subject: [PATCH] Fix hidden Previous step button in CodeLens --- src/editor/codelens.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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',