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 scrolloff at view bottom #6142

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

pascalkuthe
Copy link
Member

@pascalkuthe pascalkuthe commented Feb 28, 2023

Fixes #6141

Fixes a regression introduced in #5420 where a scrolloff of x - 1 was used instead of x at the bottom of the screen (but not at the top). This was especially problematic if the scrolloff was set to 0 in that case the scrolloff behaved as tough set to -1 and the cursor disappeared from the view if scrolled to the bottom (see #6141).

Fixes a regression introduced in helix-editor#5420 where a scrolloff of `x - 1`
was used instead if `x` at the bottom of the screen. This was
especially problematic if the scrolloff was set to `0` in that case
the scrolloff behaved as tough set to `-1` and the cursor disappeared
from the view if scrolled to the botoom.
@pascalkuthe pascalkuthe added C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer. labels Feb 28, 2023
@gibbz00
Copy link
Contributor

gibbz00 commented Mar 2, 2023

Possibly add a test for this?

@the-mikedavis
Copy link
Member

I think this would be more tricky to test than it is worth at the moment - we don't have tests that look at the rendering output currently

@the-mikedavis the-mikedavis changed the title fix scrolloff at view bottom Fix scrolloff at view bottom Mar 3, 2023
@the-mikedavis the-mikedavis merged commit 5c716af into helix-editor:master Mar 3, 2023
@pascalkuthe pascalkuthe deleted the scrolloff_fix branch March 3, 2023 16:06
estin pushed a commit to estin/helix that referenced this pull request Mar 4, 2023
Fixes a regression introduced in helix-editor#5420 where a scrolloff of `x - 1`
was used instead if `x` at the bottom of the screen. This was
especially problematic if the scrolloff was set to `0` in that case
the scrolloff behaved as tough set to `-1` and the cursor disappeared
from the view if scrolled to the botoom.
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
Fixes a regression introduced in helix-editor#5420 where a scrolloff of `x - 1`
was used instead if `x` at the bottom of the screen. This was
especially problematic if the scrolloff was set to `0` in that case
the scrolloff behaved as tough set to `-1` and the cursor disappeared
from the view if scrolled to the botoom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String search jumps off-screen
3 participants