Debugger: Switch Breakpoint Anchor from left to right (#27688)

This fixes an edge case where some breakpoints would not render
correctly when expanding a conflict git hunk.

## Before 


https://github.com/user-attachments/assets/4fd75ef6-8381-4f9e-9765-5eeb3a734df0

## After


https://github.com/user-attachments/assets/b2b49894-2dc2-42ba-8038-504a1b4c2665


Release Notes:

- N/A

Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Anthony Eid 2025-03-28 16:04:44 -04:00 committed by GitHub
parent 28f0ba3381
commit 55c1f9d26c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 93 additions and 93 deletions

View file

@ -17,7 +17,7 @@ use std::{
path::Path,
sync::Arc,
};
use text::PointUtf16;
use text::{Point, PointUtf16};
use crate::{buffer_store::BufferStore, worktree_store::WorktreeStore, Project, ProjectPath};
@ -503,7 +503,7 @@ impl BreakpointStore {
this.update(cx, |_, cx| BreakpointsInFile::new(buffer, cx))?;
for bp in bps {
let position = snapshot.anchor_before(PointUtf16::new(bp.position, 0));
let position = snapshot.anchor_after(Point::new(bp.position, 0));
breakpoints_for_file.breakpoints.push((
position,
Breakpoint {