# Use first line comment prefix when toggling comments \(\#10335\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a0ee29a80619df3512ca08f259a3d8446ab27158

Requested commit: a0ee29a80619df3512ca08f259a3d8446ab27158

Commit: a0ee29a80619df3512ca08f259a3d8446ab27158

Tree: 6103aeb707364ed17f8a1362366bf87184fee1e8

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Use first line comment prefix when toggling comments (#10335)

This fixed an issue introduced in
https://github.com/zed-industries/zed/pull/10126, where, when toggling
comments in a language with multiple line comment prefixes (e.g. Gleam,
Erlang) Zed would insert the *last* prefix instead of the first.

Release Notes:

- Fixed an issue where the `toggle comments` command inserted the wrong
line comment prefix in some languages (preview only).

Co-authored-by: Marshall <marshall@zed.dev>
```

## Parents

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

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