From 6284eeebef984ac1afd3846b606a7745c5dfb49d Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 7 Nov 2024 16:59:23 +0700 Subject: [PATCH] fix: cursor position --- .../context/root-path-context/RootPathContextService.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autocomplete/context/root-path-context/RootPathContextService.test.ts b/core/autocomplete/context/root-path-context/RootPathContextService.test.ts index 87795611b..ccce0b6ac 100644 --- a/core/autocomplete/context/root-path-context/RootPathContextService.test.ts +++ b/core/autocomplete/context/root-path-context/RootPathContextService.test.ts @@ -74,7 +74,7 @@ export async function testRootPathContext( throw new Error("AST is undefined"); } - const treePath = await getTreePathAtCursor(ast, rangeToFill.start.character); + const treePath = await getTreePathAtCursor(ast, prefix.length); const snippets = await service.getContextForPath(startPath, treePath); expectedSnippets.forEach((expectedSnippet) => {