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

fix: don't move preview window while it's focused #710

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

ooesili
Copy link
Contributor

@ooesili ooesili commented Jan 4, 2023

Fixes a bug introduced by #705

Currently, if the hunk preview window is focused and the user moves their cursor inside the preview window, the preview window will gradually move down and too the right by on column and row per move. This is because the floating preview window is incorrectly being adjusted to have its position be relative to the cursor which is offset by the floating window boarder.

This commit updates the WinScrolled autocommand introduced by #705 to be scoped to buffer of the file so that this doesn't happen.

@ooesili
Copy link
Contributor Author

ooesili commented Jan 4, 2023

I just saw #708, sorry about that 😅

This commit reverts the revert made for that issue and fixes the moving window problem.

@lewis6991
Copy link
Owner

Cool. Let's give it another try.

@lewis6991 lewis6991 merged commit d4f8c01 into lewis6991:main Jan 4, 2023
@ooesili ooesili deleted the preview-scroll-fix branch January 4, 2023 20:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants