Fix a bunch of auto-complete issues

This commit is contained in:
Christopher Schleiden
2023-01-19 10:17:43 -08:00
parent a7fd04c47d
commit e6a2e3eb43
10 changed files with 214 additions and 73 deletions
@@ -21,4 +21,12 @@ describe("getPositionFromCursor", () => {
expect(position).toEqual({line: 0, character: 0});
expect(newDoc.getText()).toEqual("on: push\njobs:");
});
it("handles a cursor in the middle of the document", () => {
const input = "on: push\n jobs|:\n build:";
const [newDoc, position] = getPositionFromCursor(input);
expect(position).toEqual({line: 1, character: 6});
expect(newDoc.getText()).toEqual("on: push\n jobs:\n build:");
});
});