Skip to content

The scroll position in the Files pane resets periodically #5097

Closed

Description

@Perlence

Describe the bug

If you scroll the Files pane away from the cursor, the scroll position will reset after some time.

To Reproduce

Steps to reproduce the behavior:

  1. Select the Files pane
  2. Place the cursor on the first file in the pane
  3. Scroll down until the cursor disappears
  4. Wait...
  5. The scroll positions resets, putting the cursor back into view

Expected behavior

The scroll position stays where I left it.

Screen recording

Screen.Recording.2025-12-08.at.19.31.01.mov

Version info:

$ lzg --version
commit=, build date=, build source=Homebrew, version=0.57.0, os=darwin, arch=arm64, git version=2.52.0

$ git --version
git version 2.52.0

Activity

  1. stefanhaller commented on Dec 22, 2025

    @stefanhaller
    Collaborator

    @Perlence I noticed this too, and find it annoying. There are also other situations where selections are scrolled into view again, and not just in the Files panel, for example after every background fetch.

    Here's a fix: #5134. It's a pretty fundamental change, I hope this didn't break anything, so thorough testing would be good.

  2. Perlence commented on Dec 22, 2025

    @Perlence
    Author

    It also fixes the issue with the background fetch? Great! I noticed it when I was browsing a long list of remote branches.

    Let me build it and run it for a while.

  3. stefanhaller commented on Dec 22, 2025

    @stefanhaller
    Collaborator

    @Perlence I pushed one more commit to make the code less confusing; please pull and build again. It shouldn't really change anything, but it's still better to test the latest version to be sure.

  4. stefanhaller commented on Dec 23, 2025

    @stefanhaller
    Collaborator

    I found a regression: when scrolling down the branches panel and then checking out another branch, it wouldn't scroll up to the top to make the newly checked-out branch visible. I pushed a fix for that, but I do wonder how many more of these we have...

  5. stefanhaller commented on Dec 23, 2025

    @stefanhaller
    Collaborator

    I decided to merge the PR because I want to build other work on top of it, and maintaining a stack of branches is becoming annoying. If we find other regressions, we'll just have to make new PRs to fix them.

  6. added a commit that references this issue on Dec 23, 2025
    e1a8327
  7. Perlence commented on Dec 23, 2025

    @Perlence
    Author

    Thank you Stefan! I'll check out the master branch and see if I notice anything.

  8. stefanhaller commented on Jan 6, 2026

    @stefanhaller
    Collaborator

    @Perlence Found another regression, fix is here: #5182

  9. Perlence commented on Jan 6, 2026

    @Perlence
    Author

    Wow! I personally haven't had any issues so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions