Skip to content

Focus in the local branches tab jumps after fetch #4116

@wolfgangwalther

Description

@wolfgangwalther

Describe the bug

Whenever a "git fetch" operation runs/finishes the focus in the local branches seems to jump back to the branch it was on when starting the fetch.

This seems to happen for both manual fetches via "f" and auto fetches in the background.

To Reproduce
Steps to reproduce the behavior:

  1. Change refresher.fetchInterval to 1 second.
  2. Go to "Local branches"
  3. Go through your list of branches maybe ~2 / second.
  4. Notice that the selected branch jumps back repeatedly.

Expected behavior
A fetch operation should not affect the selected branch.

Version info:

commit=4a7cf6040, build date=20241212.080257, build source=unknown, version=v0.44.1.4a7cf6040, os=linux, arch=amd64, git version=2.47.1

Additional context
This is especially problematic when you navigate to a different branch to delete it - if you do that fast enough and are unlucky enough... you'll end up deleting a different branch than you wanted to, because the selection jumps between "navigate to the branch" and "hit delete".

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