math2001 / MarkdownLivePreview

A Sublime Text 3 plugin to preview your markdown as you type
https://math2001.github.io/MarkdownLivePreview
MIT License
304 stars 37 forks source link

Editing markup brings preview to top of file #8

Closed BradAndreBurns closed 7 years ago

BradAndreBurns commented 7 years ago

When I'm editing the md file, the preview seems to always want to stay at the top of the file. That means if I want to preview what I'm currently typing I have to go over to the preview window and scroll to what I've just entered - then when I keep typing, the preview window jumps back to the top of the file. Is there a possibility of tracking where the user is typing in the md document and syncing the preview window to that position?

math2001 commented 7 years ago

Yes, that's something I need to work on: https://github.com/math2001/MarkdownLivePreview/blob/master/MarkdownLivePreview.tasks#L3

Is there a possibility of tracking where the user is typing in the md document and syncing the preview window to that position?

Yes, there is (with a percentage).

BradAndreBurns commented 7 years ago

Ah yes... sorry about that - I didn't see your tasks file. Glad to see that you have it in the works - it's a really useful plugin.

math2001 commented 7 years ago

Ah yes... sorry about that

It's okay 😄

it's a really useful plugin.

Thanks

math2001 commented 7 years ago

I've pushed a new tag (v2.2.0). In the command palette (ctrl+shift+p), select Package Control: Upgrade Package, and pick MarkdownLivePreview. To be safe, you can restart Sublime Text, and now it should work :slightly_smiling_face:

BradAndreBurns commented 7 years ago

Thanks for the effort and quick responses. I did the upgrade and restarted Sublime Text - nothing changed. I looked at your checkin and there doesn't seem to be any actual code difference in the 4 files that were changed. Was there possibly a file that wasn't checked in?

math2001 commented 7 years ago

Sorry, I left a mistake, I didn't see it because the plugin hasn't been reloaded. I've pushed a new tag v2.2.1 with this bug fixed. I've restarted ST (reload everything), and it's working.

BradAndreBurns commented 7 years ago

I just tried v2.2.1 and yep, it seems to work well. Thanks very much for that. Well done. 👍