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>
05eea8a321liam committed on 6/9/2026, 2:47:01 AM· committed by GitHubparent0d8a4d4
2 files changedLine totals unavailable