Skip to content

Filtered view doesn't update when underlying model changes #2816

@stefanhaller

Description

@stefanhaller

It seems that the filtered view remembers indices into the model of the items that it should display. If the model changes, these are not updated, so the wrong items are shown.

There are probably many variations of situations in which this happens, but the two most common ones that I have run into are:

Checking out a filtered branch

  1. Press / and filter the list of branches down so that only a single branch is shown (which is not the current one)
  2. Press space to check out this branch
  3. Expected: the same branch should still be displayed in the filtered list; actual: an arbitrary different one is displayed instead

Deleting a filtered branch

  1. Filter the list of branches down so that three branches are shown
  2. Select one of these and press d to delete it
  3. Expected: only two branches should be displayed now; actual: it still shows three branches, and (depending on the order of the branches) totally arbitrary ones

Version info:
commit=a30537a4da5e6633135f9a7f423a5b23b14d9797, build date=2023-07-21T15:58:51Z, build source=unknown, version=a30537a4, os=darwin, arch=arm64, git version=2.41.0.49.g2c35e38aee

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