# editor: Show format selections for cursor ranges \(\#56571\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 05eea8a321c27f913ca8db75d79a6e5bcf7bba64

Requested commit: 05eea8a321c27f913ca8db75d79a6e5bcf7bba64

Commit: 05eea8a321c27f913ca8db75d79a6e5bcf7bba64

Tree: 4d9f447814c517fa16faf52c6771fedc3528dc06

Author: liam

Committer: GitHub

## Message

```
editor: Show format selections for cursor ranges (#56571)

Resolves https://github.com/zed-industries/zed/issues/56556  

This diff fixes format selections being unavailable when the selection
is a cursor range. The action was gated on having at least one non-empty
selection, which hid it even when the active formatter supported range
formatting.

With this change, cursor ranges are included when checking whether the
selected buffers support range formatting. This restores the
cursor-based `Format Selections` behavior while preserving the existing
formatter-capability gate, so the action still stays hidden for
formatters that cannot format ranges.


https://github.com/user-attachments/assets/fc2ab2b7-1af3-4849-841a-b57a685d748f

Release Notes:
- Fixed format selections not being available for cursor ranges when the
active formatter supports range formatting.

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
```

## Parents

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

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