Properly calculate expanded git diff hunk highlight ranges (#11632)

Closes https://github.com/zed-industries/zed/issues/11576

Release Notes:

- Fixed expanded diff hunks highlighting an extra row as added
([11576](https://github.com/zed-industries/zed/issues/11576))
This commit is contained in:
Kirill Bulatov 2024-05-10 02:02:56 +03:00 committed by GitHub
parent 50c45c7897
commit 4762e52d31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 161 additions and 121 deletions

View file

@ -120,7 +120,7 @@ impl GoToLine {
let anchor = snapshot.buffer_snapshot.anchor_before(point);
active_editor.clear_row_highlights::<GoToLineRowHighlights>();
active_editor.highlight_rows::<GoToLineRowHighlights>(
anchor..anchor,
anchor..=anchor,
Some(cx.theme().colors().editor_highlighted_line_background),
cx,
);