Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ralf3u opened this issue Nov 29, 2021 · 4 comments

Comments

@ralf3u
Copy link

ralf3u commented Nov 29, 2021

Steps to reproduce

  • open Geany with two documents: one very long txt-document and one very long html-document
  • html-document is in focus
  • close Geany
  • open Geany (result: the content of preview is on top)
  • tab-browse with the mouse or with shortcuts in the editor, and then back to the html-document (result: the content of preview is not any more on top)

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

Remark

  • the issue does not occur with a very short txt-document
  • the issue appears for fountain, html and md
  • the issue is a big problem because it has an impact on issue number 23

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
Copy link
Author

ralf3u commented Nov 30, 2021

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
Copy link
Owner

xiota commented Dec 1, 2021

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
Copy link
Author

ralf3u commented Dec 10, 2021

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
Copy link
Author

ralf3u commented Jun 16, 2022

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 xiota/geanylua-scripts#5. But I think that the issue will also not appear there.

@ralf3u ralf3u closed this as completed Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants