# editor: Fix calculate relative line number panic \(\#41352\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 2b5699117f223575a0567ff70a691bc737ef62f4

Requested commit: 2b5699117f223575a0567ff70a691bc737ef62f4

Commit: 2b5699117f223575a0567ff70a691bc737ef62f4

Tree: 9f541ecb2014615e9f9ced2003b276b31a47cb17

Author: Anthony Eid

Committer: GitHub

## Message

```
editor: Fix calculate relative line number panic (#41352)

### Reproduction steps

1. Turn on relative line numbers
2. Start a debugging session and hit an active debug line
3. minimize Zed so the editor element with the active debug line has
zero visible rows

#### Before 

https://github.com/user-attachments/assets/57cc7a4d-478d-481a-8b70-f14c879bd858
#### After 

https://github.com/user-attachments/assets/19614104-f9aa-4b76-886b-1ad4a5985403

Release Notes:

- debugger: Fix a panic that could occur when minimizing Zed
```

## Parents

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

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