# editor: Fix columnar selection incorrectly uses cursor to start selection instead of mouse position \(\#31888\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3fb1023667e1ce4affce4a9177fe11800d838115

Requested commit: 3fb1023667e1ce4affce4a9177fe11800d838115

Commit: 3fb1023667e1ce4affce4a9177fe11800d838115

Tree: 301a6f28e32285292a3217761038818dc16e8931

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Fix columnar selection incorrectly uses cursor to start selection instead of mouse position (#31888)

Closes #13905

This PR fixes columnar selection to originate from mouse position
instead of current cursor position. Now columnar selection behaves as
same as Sublime Text.

1. Columnar selection from click-and-drag on text (New):


https://github.com/user-attachments/assets/f2e721f4-109f-4d81-a25b-8534065bfb37

2. Columnar selection from click-and-drag on empty space (New): 


https://github.com/user-attachments/assets/c2bb02e9-c006-4193-8d76-097233a47a3c

3. Multi cursors at end of line when no interecting text found (New): 


https://github.com/user-attachments/assets/e47d5ab3-0b5f-4e55-81b3-dfe450f149b5

4. Converting normal selection to columnar selection (Existing):


https://github.com/user-attachments/assets/e5715679-ebae-4f5a-ad17-d29864e14e1e


Release Notes:

- Fixed the issue where the columnar selection (`opt+shift`) incorrectly
used the cursor to start the selection instead of the mouse position.
```

## Parents

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

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