Skip to content

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 ooesili force-pushed the preview-scroll-fix branch from 72a43f2 to 75b4769 Compare January 4, 2023 18:30
@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.

2 participants