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:
parent
28f0ba3381
commit
55c1f9d26c
4 changed files with 93 additions and 93 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue