fix: cursor position

This commit is contained in:
tomasz-io 2024-11-07 16:59:23 +07:00
parent f60009c2ea
commit 6284eeebef

View file

@ -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) => {