Command deleteMarkupBackward() cuts characters

I think deleteMarkupBackward() behaves wierdly when used in list. It removes characters that are present after the cursor, which is way wierd.

My test looks something like this

test('deleteMarkupBackward from end of list', () =>
    state: content("- Foo\n-\n  Welcome", 10),
    command: deleteMarkupBackward,
    expected: content("- Foo\n-\nWelcome", 8)

I think in your test format that’d be something like:

it("from end of list", () =>
  test("- Foo\n-\n  |Welcome", "- Foo\n-\n|Welcome"))

I don’t know your DSL language, I did my best trying to recreate it. Anyway, this test fails.

The actual content present after the comand run is

- Foo

Hah, these turn out to be endlessly finicky to get right. This patch should help here.

1 Like

Thanks for a quick fix!

Installed it and works fine! Can you release it, please?

Thanks for testing. Released as 0.19.6

1 Like