xiota / geany-preview

Turns Geany into a markdown editor by providing a preview pane in the sidebar to show the formatting of several light-weight languages as they are edited. Supported document types include AsciiDoc, DocBook, Fountain, HTML, LaTeX, Markdown, MediaWiki, reStructuredText, Textile, and Txt2Tags.
GNU General Public License v3.0
15 stars 0 forks source link

the content of preview might change its position when tab-browsing in the editor with snippet false #25

Closed ralf3u closed 2 years ago

ralf3u commented 3 years ago

Steps to reproduce

Expectation The content of preview should not change its position during tab-browsing in the editor. It should stay on top.

Remark

Possible solution When tab-browsing on a document with snippet true, then it does not reset something when tab-browsing on a document with snippet false, and that is why the content is changing its position. Evidence: The issue does not appear when tab-browsing only between fountain-documents and html-documents, both very long, and both with snippet false.

ralf3u commented 3 years ago

If I change in preview.conf snippet_pandoc=true to snippet_pandoc=false (Edit,Preferences Plugin, Preview, Reload Config, Apply and OK), then the issue does not exist any more. But that does not mean that the issue is fixed.

xiota commented 3 years ago

The scroll position for snippets mode will be unstable until I can figure out how to sync the editor and webview.

For the other documents, the scroll position might be saved/restored with the wrong index when the document is switched. I'll have to review the code and see if I can spot the mistake.

ralf3u commented 2 years ago

Remark Because of issue number 29 is nearly solved, there is now an empty preview for txt-documents, so the issue can not be reproduced with txt-documents at the moment. But the issue can be reproduced with long fountain-documents with snippet_fountain=true.

ralf3u commented 2 years ago

Today, I can not reproduce the issue when snippet of html and md are false, neither with html, nor with md. For fountain, I can't do tests because of https://github.com/xiota/geanylua-scripts/issues/5. But I think that the issue will also not appear there.