retext icon indicating copy to clipboard operation
retext copied to clipboard

Pane sync not working

Open internationils opened this issue 5 years ago • 7 comments
trafficstars

Running 7.1.0 with Qt 5.12.8 under latest Ubuntu Focal... the preview pane and source pane are not synchronizing, even though the option is checked. I have tried restarting, but no luck.

internationils avatar Jun 08 '20 13:06 internationils

What exactly happens — is the preview panel blank, or it displays a rendered content of some old version of the text? Does it happen with any document or only a specific one? Does closing and opening preview help? And what about closing and opening the file?

Also can you please run retext from terminal and see if there is any output pasted?

mitya57 avatar Jun 08 '20 19:06 mitya57

No, the preview panel is correct and up to date (sorry, I meant that the scroll does not sync, not the content), but using the scrollbars in either the text or preview does not scroll the other one. If I scroll the preview to the top and go to the bottom of the document, then I can type but the new text does not cause a scroll to the bottom in the preview pane.

When both are at the bottom and I type, then it scolls along with the new text just fine. Maybe add an option to "center on new text" that moves the preview pane to the point where you just changed text?

Running from the command line gives no messages / warnings / errors...

Also, minor nit: if I have the current line highlight option on, then with text wrapped only the one line not the several lines (i.e. line beginning to EOL) are highlighted in yellow. Not sure if that is intended or not.

internationils avatar Jun 08 '20 19:06 internationils

The synchronized scroll requires using the WebKit or WebEngine renderer, which you can enable from the Edit menu. Can you check if it is enabled?

Also, you are using Markdown, not reStructuredText, right?

with text wrapped only the one line not the several lines (i.e. line beginning to EOL) are highlighted in yellow

One of the use cases of this feature is helping to locate the cursor. Highlighting less is better from this point of view. But if you disagree please open a separate bug.

mitya57 avatar Jun 08 '20 20:06 mitya57

Ah, when checking "use WebKit" the scrolling syncs. Might be worth mentioning this next to the preferences option? Feel free to close, thanks! I've opened https://github.com/retext-project/retext/issues/516 for the highlighting topic.

internationils avatar Jun 08 '20 20:06 internationils

It is mentioned in the FAQ, but mentioning it in the Preferences is also a good idea. I will look at it.

mitya57 avatar Jun 08 '20 20:06 mitya57

Since synced scrolling of panes is a common sense expected feature, perhaps the switch to WebKit should happen automatically when the user enables live preview in the menu? I'm on ReText 7.0.4 and live preview was disabled by default. I enabled it but the gotcha about pane sync getting to work when WebKit is used is not obvious at all, I had to come here and search through the issues.

toolonely avatar Jan 16 '21 09:01 toolonely

Same here - glad I found the solution!

badrul1 avatar Jul 16 '21 06:07 badrul1