# Fix line indices when using a selection in the context \(\#33549\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f338c46bf79f773ec7a41729270227da8c2660b5

Requested commit: f338c46bf79f773ec7a41729270227da8c2660b5

Commit: f338c46bf79f773ec7a41729270227da8c2660b5

Tree: 8fdd03482e4f681f3b57e26ebd956d5d5f5355a9

Author: Alejandro Fernández Gómez

Committer: GitHub

## Message

```
Fix line indices when using a selection in the context (#33549)

Closes #33152.

The label for a file selection context had an off-by-one error on line
indices. This PR adjusts that.

Before:

<img width="1072" alt="Screenshot 2025-06-27 at 20 55 28"
src="https://github.com/user-attachments/assets/da0be503-056b-442b-9a79-38cf504d8a44"
/>

After:

<img width="1090" alt="Screenshot 2025-06-27 at 20 49 35"
src="https://github.com/user-attachments/assets/f98df57a-8f07-4ea5-a06b-a4b6fb8c2e4e"
/>


Release Notes:

- Fixed a off-by-one error on the line indices when using a selection as
context for the agent,
```

## Parents

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

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