# Fix focusing terminal when running tasks \(\#13675\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 193be271a8ca7b01bb1e9840c4c3af26249e68d4

Requested commit: 193be271a8ca7b01bb1e9840c4c3af26249e68d4

Commit: 193be271a8ca7b01bb1e9840c4c3af26249e68d4

Tree: 862abaa522b8d40a52931ec50f16ccdd316bb8a8

Author: Aleksei Gusev

Committer: GitHub

## Message

```
Fix focusing terminal when running tasks (#13675)

After removing the unnecessary reveal strategy handling:



[focus-task-fix.webm](https://github.com/zed-industries/zed/assets/39293/93afd332-8f22-47f5-914d-5bc040e24029)

When running tasks, the terminal was not focused when the terminal had
to be replaced. This is because the code for revealing the terminal had
been executed twise: once inside `replace_terminal` function and also at
the end of `spawn_task`.

Fixes #13674

Release Notes:

- Fixed focusing the terminal when re-spawning a task
([#13674](https://github.com/zed-industries/zed/issues/13674))
```

## Parents

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

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