# project_panel: When initiating a drag the highlight selection should jump to the item you've picked up \(\#32044\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 988d834c33ee09120c3a1b5dfad40862067fdde9

Requested commit: 988d834c33ee09120c3a1b5dfad40862067fdde9

Commit: 988d834c33ee09120c3a1b5dfad40862067fdde9

Tree: 3251c0e710c42feb7944305db6421fedca475580

Author: Smit Barmase

Committer: GitHub

## Message

```
project_panel: When initiating a drag the highlight selection should jump to the item you've picked up (#32044)

Closes #14496.

In https://github.com/zed-industries/zed/pull/31976, we modified the
highlighting behavior for entries when certain entries or paths are
being dragged over them. Instead of relying on marked entries for
highlighting, we introduced the `highlight_entry_id` parameter, which
determines which entry and its children should be highlighted when an
item is being dragged over it.

The rationale behind that is that we can now utilize marked entries for
various other functions, such as:

1. When dragging multiple items, we use marked entried to show which
items are being dragged. (This is already covered because to drag
multiple items, you need to use marked entries.)
2. When dragging a single item, set that item to marked entries. (This
PR)


https://github.com/user-attachments/assets/8a03bdd4-b5db-467d-b70f-53d9766fec52

Release Notes:

- Added highlighting to entries being dragged in the Project Panel,
indicating which items are being moved.
```

## Parents

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

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