Skip to content

Fix scrolling in lazygit, less, htop#826

Merged
mmstick merged 2 commits into
pop-os:masterfrom
hojjatabdollahi:hojjat/fix-scrolling
May 29, 2026
Merged

Fix scrolling in lazygit, less, htop#826
mmstick merged 2 commits into
pop-os:masterfrom
hojjatabdollahi:hojjat/fix-scrolling

Conversation

@hojjatabdollahi
Copy link
Copy Markdown
Contributor

Fixes scrolling in lazygit, less, htop, man...

If you open lazygit and try to scroll the code changes using a high res mouse (e.g. MX Master 3S). It does not scroll unless you scroll super fast. It's because the scroll even comes in and since the amount is less than a line, it gets rounded down to 0, instead getting accumulated.

The issue with less was that we always were sending normal-mode sequence b"\x1B[A", but less sets application cursor mode and expects b"\x1bOA".

I had to move report_mouse_wheel_as_arrows to the terminal.rs to keep Rust happy since we need mutable access to the terminal and the terminal's mouse_reporter.


  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@jackpot51 jackpot51 requested a review from a team May 28, 2026 21:50
@jklgrasso jklgrasso self-assigned this May 29, 2026
@mmstick mmstick merged commit 02d977a into pop-os:master May 29, 2026
10 checks passed
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.

4 participants