# sidebar: Fix cmd-click in the header not taking to the last workspace \(\#54128\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9fbe317588ac48792d29100315fddc6c15c07e31

Requested commit: 9fbe317588ac48792d29100315fddc6c15c07e31

Commit: 9fbe317588ac48792d29100315fddc6c15c07e31

Tree: b000df8ca7d8def463dc2c4ab573fe8cfe585164

Author: Danilo Leal

Committer: GitHub

## Message

```
sidebar: Fix cmd-click in the header not taking to the last workspace (#54128)

Fixes a bug where we weren't properly recording the last active
workspace to power the cmd-click interaction in the sidebar's header.
This PR introduces a field in the sidebar struct for that, allowing to
store that value and to come back to it when clicking on the header,
which is the single caller of the function introduced here.

Release Notes:

- Agent: Fixed a bug where cmd-clicking on the project header wouldn't
actually take you to the last active workspace.
```

## Parents

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

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