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
12 stars 0 forks source link

content of the Preview-tab is shaking when editing fountain-documents with snippet_fountain=true #18

Closed ralf3u closed 2 years ago

ralf3u commented 2 years ago

Steps to reproduce

Result The content of the Preview-tab is shaking.

Expectation The content of the Preview-tab should not shake when editing fountain-documents.

Remark The content of the Preview-tab does not shake when editing documents in txt, md or html.

ralf3u commented 2 years ago

I recognized today that this behavior does also exist with a very long html-document when typing extremely fast with this setting: snippet_html=false. But with snippet_html=true there is no shaking.

It seems to be that it is too much work for the processor. But nevertheless the Preview-tab should not shake.

ralf3u commented 2 years ago

Maybe those thoughts could help to find a solution:

What about the idea to put changes above each other, instead of replacing each time the content. Or, instead of putting all layers above each other, to use only two layers, the old layer and the new layer, so the old content and the new content, so that it will no shake any more.

For me, from all open issues at the moment, this is the most important issue, because it disturbs too much. I understand that the more text exists, the slower changes will appear in the Preview. But at any time there should be no shake at all.

xiota commented 2 years ago

It looks like the problem is when the CSS is directly embedded in the HTML (no shaking) vs when the CSS file is externally linked (shaking). CSS will be embedded when native Fountain and Markdown processing is used.

Fixed in 2a01f81f0e68a74a0a775b0fd90abd1b9a56c3b1. PPA will be updated.

ralf3u commented 2 years ago

I made different tests with fountain, md and html with those settings:

snippet_html=true snippet_markdown=true snippet_fountain=true extra_css=extra-media.css & extra_css=disable no background color in the html

I can confirm that this issue was fixed with the settings above. Thank you so much for that feature.

xiota commented 2 years ago

@ralf3u Thanks for confirming.