Describe the bug
When modifying text around an inline code block in vim mode, the highlighting will sometimes break until you restart. You will also get this error in the dev console:
app.js:1 RangeError: Position 25 is out of range for changeset of length 23
at e.mapPos (app.js:1:274503)
at e.map (app.js:1:304757)
at e.map (app.js:1:306904)
at ii.ViewPlugin.fromClass.decorations.update (plugin:shiki-highlighter:279:1355)
at e.update (app.js:1:363559)
at e.updatePlugins (app.js:1:472715)
at e.update (app.js:1:470762)
at e.dispatchTransactions (app.js:1:467223)
at e.dispatch (app.js:1:469370)
at mB (app.js:1:1652494)
To Reproduce
-
Enable vim mode
-
Paste this into a note:
aaa
{rust} let abc = 123;
-
Delete the "aaa" line with dd
-
Make a new line with o
-
See the highlighting disappear and an error in the console
Expected behavior
There shouldn't be any errors and the highlighting would stay.
Screenshots

Occurs on
Plugin version
0.7.0
Additional context
I disabled all other plugins to test this, the only other non vanilla thing here is the theme.
Describe the bug
When modifying text around an inline code block in vim mode, the highlighting will sometimes break until you restart. You will also get this error in the dev console:
app.js:1 RangeError: Position 25 is out of range for changeset of length 23
at e.mapPos (app.js:1:274503)
at e.map (app.js:1:304757)
at e.map (app.js:1:306904)
at ii.ViewPlugin.fromClass.decorations.update (plugin:shiki-highlighter:279:1355)
at e.update (app.js:1:363559)
at e.updatePlugins (app.js:1:472715)
at e.update (app.js:1:470762)
at e.dispatchTransactions (app.js:1:467223)
at e.dispatch (app.js:1:469370)
at mB (app.js:1:1652494)
To Reproduce
Enable vim mode
Paste this into a note:
aaa
{rust} let abc = 123;Delete the "aaa" line with dd
Make a new line with o
See the highlighting disappear and an error in the console
Expected behavior
There shouldn't be any errors and the highlighting would stay.
Screenshots

Occurs on
Plugin version
0.7.0
Additional context
I disabled all other plugins to test this, the only other non vanilla thing here is the theme.