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

Aggressive editor.scrolloff causes infinite loop #9776

Closed
senekor opened this issue Mar 1, 2024 · 2 comments
Closed

Aggressive editor.scrolloff causes infinite loop #9776

senekor opened this issue Mar 1, 2024 · 2 comments
Labels
C-bug Category: This is a bug

Comments

@senekor
Copy link
Contributor

senekor commented Mar 1, 2024

Summary

Setting editor.scrolloff to a high number causes helix to freeze in an infinite loop in some (large?) files.

Setting scrolloff to a low number for now is fine. But I quite like having the cursor pretty much in the middle most of the time, so I like to have it at 24.

Note that the freeze only affects helix itself, the terminal and zellij session around it continue to work fine.

Reproduction Steps

I tried this:

  1. Set editor.scrolloff to a high number like 24. (I can still reproduce with 12)
  2. Open this specific file in helix.
  3. Hammer around on PageUp and PageDown to trigger the freeze the fastest (just a few seconds for me). Simply scrolling with arrow keys also causes the freeze after some time.
  4. Observe in your system monitor that one CPU core is used at 100% by helix.
  5. SIGKILL helix, SIGTERM does not work.

I expected this to happen:

no freeze

Instead, this happened:

helix freezes

Helix log

~/.cache/helix/helix.log
2024-03-01T15:26:46.759 helix_view::clipboard [DEBUG] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard
2024-03-01T15:26:46.795 helix_view::editor [ERROR] Failed to initialize the language servers for `source.md` - `marksman` { cannot find binary path }
2024-03-01T15:26:46.795 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2024-03-01T15:26:46.796 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 799.024µs)
2024-03-01T15:26:46.797 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-03-01T15:26:47.010 helix_term::application [DEBUG] received editor event: IdleTimer
2024-03-01T15:26:47.110 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-03-01T15:26:47.297 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-03-01T15:26:47.480 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0

Platform

Linux (Fedora 39)

Terminal Emulator

alacritty 0.13.0

Installation Method

dnf (copr: varlad/helix)

Helix Version

helix 23.10 (f6021dd)

@senekor senekor added the C-bug Category: This is a bug label Mar 1, 2024
@the-mikedavis
Copy link
Member

Can you reproduce in a non-markdown file, or without changing scrolloff, or when you've built from the latest master? This looks to me like #8709 rather than a problem with scrolloff

@senekor
Copy link
Contributor Author

senekor commented Mar 1, 2024

Very interesting, changing the file extension to txt fixed the issue! I guess this is fixed on master then, I'll try that out later. But feel free to close already. Thank you!

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
Projects
None yet
Development

No branches or pull requests

2 participants