# editor: Fix showing completion list with selection does not include the selection \(\#57405\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e990f31ad7a7dd1bc1878b68fb55b89a4753b151

Requested commit: e990f31ad7a7dd1bc1878b68fb55b89a4753b151

Commit: e990f31ad7a7dd1bc1878b68fb55b89a4753b151

Tree: 485fe7d912487b91068154f0181b6b18ade9505c

Author: Finn Eitreim

Committer: GitHub

## Message

```
editor: Fix showing completion list with selection does not include the selection (#57405)

Fix the completion list not showing the current selection when you
execute `editor: show completions`, the stated reason by comment before
is that if you are in a tabstop snippet already it wont give you the
correct options. So my change is to just check if you are in such a
snippet and if not give the new desired behavior.

before:


https://github.com/user-attachments/assets/1b2f3594-7361-4636-9ef3-f8c9419faa26

after:


https://github.com/user-attachments/assets/1be35582-464a-40f3-b6be-ee74f9961796


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #57386

Release Notes:

- editor: include text from selection in completion list.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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