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

Sync position between View and Edit modes #679

Closed
JohnVeness opened this issue Sep 18, 2019 · 6 comments
Closed

Sync position between View and Edit modes #679

JohnVeness opened this issue Sep 18, 2019 · 6 comments

Comments

@JohnVeness
Copy link

I have the setting "Prefer view" ticked, so that when I enter, say, a Markdown file, I get a nice rendered view with a table of contents. I can use the ToC to navigate to a position which might be a long way down the document.

I swipe to enter edit mode, and instead the document will be at the place I was last editing, not the place I was viewing.

Similarly, if I'm in edit mode and make some changes then swipe to view, the view will be at the scroll position when last in view, not where I was just editing.

It would be great if the scroll positions in the two modes could be synchronised somehow. I realise this can be hard with different font sizes, and differences with rendering, but it'd be good if it could at least be vaguely right. Maybe try and match the top line in both modes. Or the middle line. Or, for when moving from Edit to View at least, maybe try to keep the line that had the cursor on it in Edit appear in roughly the same vertical place when switching to View.

Many thanks for considering this. I realise it's hard!

@gsantner
Copy link
Owner

I thought about this too. But it's not that easy, because you dont get what you see. At least converted text line wise

@gsantner
Copy link
Owner

gsantner commented Sep 21, 2019

I'm closing this as it's very unlikely to happen.

Markor uses different converters and it's impossible to always know wheres what exactly afterwards. And injecting something into webview text is not an option.

@contrapunctus-1
Copy link

Sorry to hear that, because I find this to be a noticeable hindrance to productivity in Markor. 🙁

@davebrny
Copy link

davebrny commented Jun 1, 2020

on really large documents i would rather it guessed the scroll position and got it close enough vs having to start at the very start each time, but thats just me. i get that it wouldnt seem very professional and people would probably start hounding you about it not being exact

@gsantner
Copy link
Owner

gsantner commented Jun 1, 2020

Not much feasable with flexmark.
And also even less because it would need implementation in every format, Markor is not just Markdown.

@davebrny
Copy link

davebrny commented Jun 1, 2020

fair enough, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants