aidenlx / obsidian-icon-shortcodes

Obsidian Plugin: Insert emoji and custom icons with shortcodes
MIT License
138 stars 11 forks source link

Error when moving lines up and down and toggling bullet lists #66

Open jsabol opened 1 year ago

jsabol commented 1 year ago

If I move liines up and down with a hotkey, I get this error in the console...

Error: Ranges must be added sorted by `from` position and `startSide`
    at e.addInner (app.js:1:306320)
    at e.update (app.js:1:302547)
    at e.update [as updateF] (plugin:obsidian-icon-shortcodes:7:99395)
    at Object.update (app.js:1:284690)
    at e.computeSlot (app.js:1:295483)
    at Rn (app.js:1:288634)
    at new e (app.js:1:294509)
    at e.applyTransaction (app.js:1:295425)
    at e.get (app.js:1:290638)
    at e.update (app.js:1:438239)

The hotkeys to do this are "Move line up" and "Move line down"

I also get this same error when I select several lines, and use the hotkey "Toggle bullet list". This only happens in lines with Icon Shortcodes.

homosco commented 1 year ago

Same Error here:

app.js:1 Command failed to execute:  editor:swap-line-down
app.js:1 Error: Ranges must be added sorted by `from` position and `startSide`
    at e.addInner (app.js:1:306658)
    at e.update (app.js:1:302885)
    at e.update [as updateF] (state.ts:133:27)
    at Object.update (app.js:1:285028)
    at e.computeSlot (app.js:1:295821)
    at Vn (app.js:1:288972)
    at new e (app.js:1:294847)
    at e.applyTransaction (app.js:1:295763)
    at e.get (app.js:1:290976)
    at e.update (app.js:1:440972)
e.executeCommand @ app.js:1
e.onTrigger @ app.js:1
e.handleKey @ app.js:1
e.handleKey @ app.js:1
t.handleKey @ app.js:1
e.onKeyEvent @ app.js:1

Happens only on Bullet-lists. The position of the icon on the line (front, center, end) has no influence.