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

Bind_scroll offset with expanding fields (..contents::) #5

Open
danielboone opened this issue Oct 7, 2014 · 1 comment
Open

Bind_scroll offset with expanding fields (..contents::) #5

danielboone opened this issue Oct 7, 2014 · 1 comment

Comments

@danielboone
Copy link

Bonjour,
I noticed and offsed in the "Vim vs Browser" binded scrolling when there is a "..contents::" field (and probably also with any other expanding content like (ex: ..image::)). I looked at the s:scroll() function but sorry not being able to propose a pull request.
Best regards,

@gu-fan
Copy link
Owner

gu-fan commented Oct 8, 2014

Well, adding offset with binding contents is not that easy.

Firstly, You don't know If there is an expanding fields(You should parse and check the vim file then, which is not easy, though maybe we can add code to 'Riv.vim''s parser to achieve this.)

Secondly, You don't know the height of the expanding fields.(which need parsing the html file)

So, I have no recent plan for doing this.
If you want to achieve this.
you can check the code of InstatRst and instant-rst.py

vim:
https://github.com/Rykka/InstantRst/blob/master/after/ftplugin/rst/instantRst.vim#L103
server:
https://github.com/Rykka/instant-rst.py/blob/master/instant_rst/server.py#L32
template:
https://github.com/Rykka/instant-rst.py/blob/master/instant_rst/templates/index.html#L27

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

No branches or pull requests

2 participants