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 low/high crash for big scrolloff values #1504

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Fix low/high crash for big scrolloff values #1504

merged 1 commit into from
Dec 11, 2023

Conversation

joelim-work
Copy link
Collaborator

@joelim-work joelim-work commented Nov 18, 2023

Steps to reproduce crashing for low:

  1. Set scrolloff to a large value, for example set scrolloff 1000
  2. Ensure the current directory has more files than the terminal height
  3. Run the low command

Steps to reproduce crashing for high:

  1. Set scrolloff to a large value, for example set scrolloff 1000
  2. Scroll down (e.g. using scroll-down) so that the first file in the directory is not shown
  3. Run the high command

This happens because the code does not cap the value of scrolloff at half the window height like the up/down commands.

@joelim-work joelim-work mentioned this pull request Nov 18, 2023
@joelim-work joelim-work merged commit ec9bdad into gokcehan:master Dec 11, 2023
4 checks passed
@joelim-work joelim-work deleted the fix-low-crash branch December 11, 2023 04:41
@gokcehan gokcehan mentioned this pull request Mar 31, 2024
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.

Crash on :low
1 participant