Track buffer row divergence while iterating through diff lines

This allows for offsetting head row index of deleted lines to normalize
into buffer row space
This commit is contained in:
Julia 2022-09-15 17:44:01 -04:00
parent 446bf88655
commit b9d84df127
2 changed files with 27 additions and 31 deletions

View file

@ -552,7 +552,7 @@ impl EditorElement {
//TODO: This rendering is entirely a horrible hack
DiffHunkStatus::Removed => {
let row = hunk.buffer_range.start as i64 - 1;
let row = hunk.buffer_range.start;
let offset = line_height / 2.;
let start_y = row as f32 * line_height + offset - scroll_top;