# Debugger UI: Fix breakpoint rendering in git hunks \(\#27538\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5f8c53ffe8bcb6623d43502e7e5ca6d0288c5318

Requested commit: 5f8c53ffe8bcb6623d43502e7e5ca6d0288c5318

Commit: 5f8c53ffe8bcb6623d43502e7e5ca6d0288c5318

Tree: 1e359d62db447d00baa98e9af1645db636f4bc84

Author: Anthony Eid

Committer: GitHub

## Message

````
Debugger UI: Fix breakpoint rendering in git hunks (#27538)

This PR fixes a bug where breakpoints would be rendered on incorrect
lines when openings a git hunk that contained breakpoints. This also
disables breakpoints from being shown in deleted git hunks as well.

Note: There's some unexpected behavior when using an anchor to get a
display point that is in an open git hunk, where the
`anchor.to_point().col == 0`.

```rust
                let position = multi_buffer_anchor
                    .to_point(&multi_buffer_snapshot)
                    .to_display_point(&snapshot);
```

The above code will return a display point that is one line below where
the anchor actually represents when it's in an opened hunk diff. Which
causes the bug shown below



https://github.com/user-attachments/assets/bd15d02a-3cdc-4c8e-841f-bef238583351


@ConradIrwin Is this expected behavior when calling
`.to_display_point(&snapshot)`?

Release Notes:

- N/A
````

## Parents

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

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