Files
zed/crates/editor
xdBronch 8385157b2f editor: Fix off by one in Open Docs action (#64317)
# Objective

using `editor: open docs` never chose the local file even when it
existed, found it was because this was slicing off the leading `/` which
gave an invalid path

## Solution

slice the URI correctly to preserve the path

## Testing

tested by using `editor: open docs` in my project before and after
running `cargo doc`, before it went to doc.rs, after it opened the local
docs file

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- fixed opening local documentation when using `editor: open docs`

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-10-05 08:21:11 +00:00
..