Handle deletions more robustly and correctly

This commit is contained in:
Julia
2022-09-29 13:16:02 -04:00
parent 96917a8007
commit c1249a3d84
2 changed files with 26 additions and 9 deletions
+2 -2
View File
@@ -552,10 +552,10 @@ impl EditorElement {
//TODO: This rendering is entirely a horrible hack
DiffHunkStatus::Removed => {
let row_above = hunk.buffer_range.start;
let row = hunk.buffer_range.start as i64 - 1;
let offset = line_height / 2.;
let start_y = row_above as f32 * line_height + offset - scroll_top;
let start_y = row as f32 * line_height + offset - scroll_top;
let end_y = start_y + line_height;
let width = 0.4 * line_height;