# recent_projects: Allow bulk deleting entries without scroll jumping \(\#54777\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4e28b0a3fc6f7080de89919fef5ab3bd4c6813fa)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4e28b0a3fc6f7080de89919fef5ab3bd4c6813fa

Requested commit: 4e28b0a3fc6f7080de89919fef5ab3bd4c6813fa

Commit: 4e28b0a3fc6f7080de89919fef5ab3bd4c6813fa

Tree: b222fb69bc6671239126770cdcd7ded629119a63

Author: Smit Barmase

Committer: GitHub

## Message

```
recent_projects: Allow bulk deleting entries without scroll jumping (#54777)

Closes #52292

This PR preserves the scroll offset of the List used in Recent Projects
while deleting items. It does that by:
- Adding the `is_scrolled_to_end` method to the GPUI list, which helps
us determine where the new selection should be, since it depends on
whether items are taking the deleted slot from below or above.
- Adding `ScrollBehavior` to `update_matches`, which lets you preserve
the scroll offset even for `List` (not `UniformList`) after a reset.

Before:


https://github.com/user-attachments/assets/e3eb7092-59ec-4b54-b57a-503555addd27

After:


https://github.com/user-attachments/assets/6929f6a0-04d7-44f9-a9b2-f9e5c077b368

Release Notes:

- Fixed the recent projects list jumping to the top after deleting a
project, so you can now bulk-delete entries by repeatedly clicking the
delete icon or pressing the keybind.
```

## Parents

- [6787fb13ad10226dfbc582341b62a7fb19a1061b](https://git.cafe/gitcafe/zed/commit/6787fb13ad10226dfbc582341b62a7fb19a1061b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4e28b0a3fc6f7080de89919fef5ab3bd4c6813fa?format=markdown)
