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

Switching buffers while scrolling continues scroll in new buffer #29

Open
expipiplus1 opened this issue Mar 12, 2018 · 2 comments
Open

Comments

@expipiplus1
Copy link

To reproduce:

  • Open a file in which you can scroll
  • Open a split
  • Start scrolling in one split window
  • Switch to the other split window while the scroll is in progress
  • Observe that the switched to split window is now the one scrolling

Expected behaviour:

I would expect that the scroll continues in the split window it was initiated in.

@yuttie
Copy link
Owner

yuttie commented Mar 13, 2018

@expipiplus1 Thank you for your report :)
Yes, I noticed this behavior.

Although your expected behavior is ideal, I don't have any ideas to realize it for now.
It is because we rely on <C-e> and <C-y> to scroll desired amount of lines.

One possible, but not ideal, solution is to hold simulation states per-buffer basis.
Then we can freeze the scrolling in a window when we leave to another.
If we go this way, we will sometimes see a window unintentionally start to scroll when we come back to the window 😓

Maybe, we can stop the simulation using autocmd and BufLeave (or WinLeave?) event.

@dataO1
Copy link

dataO1 commented Mar 30, 2020

Did notice the same behaviour, is there still no way to reasonably fix this?

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

3 participants