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

Scrolling the previewer by a single line can cause the previewer to scrol to the next or previous section heading #876

Open
davbeek opened this issue Aug 19, 2024 · 5 comments
Labels
bug Something isn't working ide:vscode Issues that relate to the Esbonio vscode extension lsp Issues that relate to the language server
Milestone

Comments

@davbeek
Copy link

davbeek commented Aug 19, 2024

Expected behavior

Scrolling the previewer by a few lines causes the editor to scroll a similar amount of lines.

Actual behavior

Scolling the previewer by a few lines may cause the editor to jump to the next or previous section heading. E.g. when I start the previewer at the heading Inclusions and exclusions and scroll a single line up, the editor jumps to the next section Analysis options. This big jump causes such a big difference in what I see in the previewer vs what I see in the editor that there is no longer any overlap on my 16 inch MacBook screen.

In general, the editor takes much bigger jumps than the previewer, I have noticed that it may also jump to notes or warnings or starts of figures. I am not sure if this is a bug or the intended behavior due to implementation difficulties of smooth scrolling.

Esbonio 0.95.1
Sphinx 7.3.7
Python 3.12.4
macOS Sonoma 14.6.1
VSCode 1.92.2

Log output

No response

(Optional) Settings from conf.py

No response

@davbeek davbeek added bug Something isn't working triage Issues needing triage labels Aug 19, 2024
@davbeek
Copy link
Author

davbeek commented Aug 19, 2024

On my Windows PC, I observe the same behavior.

@davbeek
Copy link
Author

davbeek commented Aug 19, 2024

When testing the behavior on my Windows system, I noticed that the issue is different from what I initially described. I have updated the two previous comments. Sorry about the initial confusion.

@davbeek davbeek changed the title After saving, scrolling the editor file by a few lines causes the previewer to scrol to next or previous section heading Scrolling the previewer by a single line can cause the previewer to scrol to the next or previous section heading Aug 19, 2024
@alcarney alcarney added ide:vscode Issues that relate to the Esbonio vscode extension lsp Issues that relate to the language server and removed triage Issues needing triage labels Aug 19, 2024
@alcarney alcarney added this to the 1.0 milestone Aug 19, 2024
@alcarney
Copy link
Member

Interesting, will have to investigate

@alcarney
Copy link
Member

Unfortunately, I've not been able to reproduce this yet - is this still an issue for you with the latest pre-release (v0.96.0)?

If so, I've fixed the esbonio.preview.showLineMarkers option, when enabled the preview window will display the source location for the elements under the cursor.

image

Do any of the locations look wrong to you?

@davbeek
Copy link
Author

davbeek commented Oct 22, 2024

I having some problems generating the correct esbonio preview. This could be due to an incorrect setup introduced by myself. Problem is that this is the busiest period of the year for me, so I don't have time to fix this now. Will let you know when I have more time. I did see that scrolling is now synchronised very nicely and works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ide:vscode Issues that relate to the Esbonio vscode extension lsp Issues that relate to the language server
Projects
Status: Todo
Development

No branches or pull requests

2 participants