inkdropapp / inkdrop-vim

Provides Vim modal control for Inkdrop, blending the best of Vim and Inkdrop
https://www.inkdrop.app/
MIT License
101 stars 9 forks source link

Write causes cursor to jump to beginning of note #22

Closed brizzbuzz closed 4 years ago

brizzbuzz commented 4 years ago

👋

Noticed a bug that has popped up recently where the :w command causes the cursor to jump to the beginning of my note.

Not sure if this is a problem introduced in V5 or a conflict with another plugin I've installed, if it would be helpful to post any system/inkdrop information to assist in reproducing please let me know :)

example

craftzdog commented 4 years ago

Hi,

Thanks for reporting it! But I couldn't reproduce it. I guess another plugin is causing it because vim plugin basically does nothing with the cursor on saving.

brizzbuzz commented 4 years ago

Interesting, will see what I can dig up!

brizzbuzz commented 4 years ago

looks like https://github.com/yaeda/inkdrop-prettier is the culprit, will investigate a bit and open up an issue in their repo :)

craftzdog commented 4 years ago

good to hear that you found it! That makes sense. The plugin updates the note every time you save and that seems to cause the issue.

brizzbuzz commented 4 years ago

Yep, and the more I think about it, I'm not sure it is really a bug so much as a side effect... there is probably some work that could be done to make it play nicer with the vim plugin but effectively restructuring the page could make maintaining cursor location tough

craftzdog commented 4 years ago

Agree if you want it to maintain cursor position strictly. But at least, I guess it's enough to just remember the last cursor position because prettier basically doesn't make a big difference.