-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add API: get the line index of the caret in a multi-line paragraph/viewport #417
Conversation
@DaveJarvis In this PR, the method |
I've changed the way scrolling is implemented. The problem I had was this: Given a plain Markdown, R Markdown, XML, or R XML file to edit, ensure that the HTML preview of the edited content is scrolled such that the cursor position is reflected. The editor is now completely decoupled from the preview pane so that processors can inject a hidden element within the text at the caret offset during processing. In other words, a token is passed along from editor, through various links of a processor chain (chain-of-responsibility pattern), and written as a Issue #386 now, which allows efficient editing by enabling the use of Home/End keys to perform the expected behaviour, is outstanding. As it stands, the name
I don't know if this is possible, but the code could be simplified to:
Or simpler still:
Or a bit more generically, re-using the aforementioned
That said, a pie-in-the-sky OOP implementation might resemble:
|
You mean... |
That's fantastic! Am greatly anticipating I still think a |
To be honest, a |
Implements feature requested in #386: