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-29 13:16:02 -04:00
parent 446bf88655
commit b9d84df127
2 changed files with 27 additions and 31 deletions
+1 -1
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;