Eclipse-Markdown-Editor-Plugin
Eclipse-Markdown-Editor-Plugin copied to clipboard
Keep position of the preview Viewer #3 work-in-progress
Change Preview Viewer refresh strategy:
- Preview Viewer uses an intermediate file, which enables the use of the
refresh()
method. Therefresh()
method does not reset the scroll position on every update of the viewer. - Preview viewer is refreshed automatically after a small delay while the user types in the Markdown editor (and not when the editor regains focus).
- Old behaviour in which the preview viewer is refreshed when the View gains focus is maintained.
It looks very great, I will merge, but giving some time to let Daniel @winterstein to take a look.
Old behaviour in which the preview viewer is refreshed when the View gains focus is maintained.
Do you mean "when View gets visible"? If it is not visible is should not be updated.
I meant when the viewer gets the focus, since there's a call to update()
in the setFocus()
method of the MarkdownPreview
ViewPart
.
Anyway, I've seen that I forgot some checks about disposed widgets in my pull request, so my patch contains some bugs. You may want to close the request without merging, use it as a baseline, or wait for my modifications :)
You could have leave it open add add more commits as well.
Have you checked issues here, I think it was discussed
Hi @paulvi ,
to tell the truth, I didn't check the open issues, but this patch is a fix for #3.
In commit https://github.com/abelgomez/Eclipse-Markdown-Editor-Plugin/commit/8e82af2d40f1e6aa5064bbdfe2a62a2a1739c242 I fixed the most important issues, mostly the use of disposed widgets. The last week I've been using the patched version and everything seems to work fine.
However I detected that some things may be improved (enable/disable options for the feature, configurable delays, etc.). Additionally, the code may be improved (specially, I don't like the static field MarkdownPreview.preview for accessing the view).
Please, test the patch and see if you like the new behavior. Then we can decide if we implement the improvements.
Cheers!
Well, frankly I will not have time for trying version from sources.
But I think for closer co-working open PR with note "work in progress" would be awesome.
Still hoping to hear from Daniel @winterstein
Hello @paulvi and @abelgomez,
This sounds good. Thank you. I'm happy for us to go ahead on Paul's say so. Sorry I wasn't able to join in here - I've been snowed under with other tasks.
Kind regards, Daniel