# editor: Fix sometimes green \(\+\) cursor style appearing when cmd-clicking to navigate and back \(\#34557\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ffc69b07e5878e376a7d31cff3e68b3075a46e0e

Requested commit: ffc69b07e5878e376a7d31cff3e68b3075a46e0e

Commit: ffc69b07e5878e376a7d31cff3e68b3075a46e0e

Tree: f00964e58ee4b12d1852cc0df4ce9e3b02d51430

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Fix sometimes green (+) cursor style appearing when cmd-clicking to navigate and back (#34557)

Regressed in https://github.com/zed-industries/zed/pull/33928

This PR clears the selection drag state when the editor focus is out.

To reproduce: 

1. Select some item in buffer that has a go to definition.
2. Cmd+Click mouse down on it, but don't let go.
3. Wait for 300ms+. 
4. Now cursor changed to green + (valid state, this is for selection
drag-n-drop).
5. Now let go of your mouse down, we switched to a different file.
Cursor looks normal.
6. Come back to the previous buffer, see green + cursor style (BUG!).

Release Notes:

- Fixed the issue where the green (+) cursor style sometimes appears
when navigating to the definition and then back to the previous buffer.
```

## Parents

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

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