# Fix multicursors not being added when clicking on line numbers \(\#28263\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 52ea501f4f4488ec8fb9cbc5e6203b69c1ce5b9e

Requested commit: 52ea501f4f4488ec8fb9cbc5e6203b69c1ce5b9e

Commit: 52ea501f4f4488ec8fb9cbc5e6203b69c1ce5b9e

Tree: 85d9502f2e02952ab127aa7295b7589b00b1042a

Author: neunato

Committer: GitHub

## Message

```
Fix multicursors not being added when clicking on line numbers (#28263)

Closes https://github.com/zed-industries/zed/issues/21372

Release Notes:

- Fixed multicursors not being added when clicking on line numbers

-----

I tracked this down to
https://github.com/zed-industries/zed/blob/b6ee367ee0e62a111164dd6e09c534e7e48bad5a/crates/editor/src/element.rs#L591

being forwarded to `editor.select()` a few lines below
https://github.com/zed-industries/zed/blob/b6ee367ee0e62a111164dd6e09c534e7e48bad5a/crates/editor/src/element.rs#L667-L675

resulting in `add == true` and `click_count == 3`, triggering this
https://github.com/zed-industries/zed/blob/b6ee367ee0e62a111164dd6e09c534e7e48bad5a/crates/editor/src/editor.rs#L2750-L2752

... and we end up removing the previous selection. 

This was added [in
2021](https://github.com/zed-industries/zed/commit/bfecdb7bc0e51ed1e37c8d0f61ceb27c5c6b5de9)
under this reasoning:

> This prevents selections added in earlier clicks from being rendered
under the pending selection.

which no longer seems to be an issue, so removing should be safe?

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
```

## Parents

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

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