A3: keep gutter change markers on their line when text is inserted at its start

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-31 14:25:47 +01:00
parent 983319d8a3
commit ce681871ad
2 changed files with 8 additions and 0 deletions

View file

@ -220,6 +220,8 @@ describe("the gutter", () => {
expect(markers(view)).toEqual({ 2: "modified" });
view.dispatch({ changes: { from: 0, insert: "new\n" } });
expect(markers(view)).toEqual({ 3: "modified" });
view.dispatch({ changes: { from: view.state.doc.line(3).from, insert: "typed\n" } });
expect(markers(view)).toEqual({ 4: "modified" });
engine.answer = { ranges: [], version: 2 };
refreshGitGutters();
await flush();