obsidian-inline-scripts icon indicating copy to clipboard operation
obsidian-inline-scripts copied to clipboard

Conflict with Vim : Unable to yank/put more than 31 lines when InlineScripts is enabled

Open AEnMe opened this issue 2 years ago • 0 comments

Hello there! I wanted to report an issue with Vim when both are enabled. It seems that when there are 31 or more lines of text, I am unable to yank/put them. I have reproduced this issue by following these steps:

  1. Opened Sandbox vault
  2. Installed the plugin and turned Vim on
  3. Created 30+ lines of text

Afterward, I tried to copy and paste 31 or more lines of text using the y 32 j p or yy 32 p commands but was unable to do so. I received the following error in the console:

TypeError: Cannot read properties of undefined (reading '0')
    at eval (plugin:obsidian-text-expander-js:8326:26)
    at fn (app.js:1:276039)
    at t.iterChanges (app.js:1:273261)
    at InlineScriptsPlugin.cm6_handleExpansionTrigger (plugin:obsidian-text-expander-js:8324:16)
    at app.js:1:293742
    at ni (app.js:1:293840)
    at e.update (app.js:1:295173)
    at e.dispatch (app.js:1:440604)
    at JP (app.js:1:1221228)
    at e.replaceRange (app.js:1:1224651)
app.js:1 TypeError: Cannot read properties of undefined (reading '0')
    at eval (plugin:obsidian-text-expander-js:8326:26)
    at fn (app.js:1:276039)
    at t.iterChanges (app.js:1:273261)
    at InlineScriptsPlugin.cm6_handleExpansionTrigger (plugin:obsidian-text-expander-js:8324:16)
    at app.js:1:293742
    at ni (app.js:1:293840)
    at e.update (app.js:1:295173)
    at e.dispatch (app.js:1:440604)
    at JP (app.js:1:1221228)
    at e.replaceRange (app.js:1:1224651)
e.handleKey @ app.js:1
keydown @ app.js:1
e.runCustomHandlers @ app.js:1
n @ app.js:1
(anonymous) @ app.js:1

If there is any additional information I can provide to help with this, please let me know.

Thank you so much for your attention to this matter!

AEnMe avatar Mar 23 '23 10:03 AEnMe