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

show a visible change in the visible area of the Preview-tab #20

Open ralf3u opened 2 years ago

ralf3u commented 2 years ago

Conditions 1: In preview.conf: snippet_html=false 2: A very long html-document where on need to scroll in the Preview-tab and where there is in the editor a lot of text within one single p-tag.

Steps to reproduce 1: scroll with the scrollbars of the sidebar to the bottom of the web-page 2: add in the editor one letter at the beginning of the p-tag

Result: The change is not in the visible area of the Preview-tab. To see the change one need to scroll in the Preview-tab to the top.

Possible solution Geany Preview should do something like this: If the visible change is not in the visible area of the Preview-tab, then put the visible change in the visible area of the Preview-tab, if possible at the same level like the highlighted line.

Remark What I mean with "show a visible change": Not all changes of the editor should be shown in the visible area of the Preview-tab, but changes in the Preview-tab that can be recognized by a person. So, for example if there is a long html-document and the user is adding at the very end of the document an empty div-tag, then Geany Preview should not execute "show a visible change in the visible area of the Preview-tab". Same for div-tags with visibility: hidden or display: none. If this is not possible to realize, then "show a change" is the alternative.