More git hunk highlighting fixes (#18459)

Follow-up to https://github.com/zed-industries/zed/pull/18454

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2024-09-27 13:48:37 -07:00 committed by GitHub
parent 689da9d0b1
commit 0daa070448
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 69 additions and 100 deletions

View file

@ -143,7 +143,7 @@ impl OutlineViewDelegate {
self.active_editor.update(cx, |active_editor, cx| {
active_editor.clear_row_highlights::<OutlineRowHighlights>();
active_editor.highlight_rows::<OutlineRowHighlights>(
outline_item.range.start..=outline_item.range.end,
outline_item.range.start..outline_item.range.end,
cx.theme().colors().editor_highlighted_line_background,
true,
cx,
@ -245,7 +245,7 @@ impl PickerDelegate for OutlineViewDelegate {
.next();
if let Some((rows, _)) = highlight {
active_editor.change_selections(Some(Autoscroll::center()), cx, |s| {
s.select_ranges([*rows.start()..*rows.start()])
s.select_ranges([rows.start..rows.start])
});
active_editor.clear_row_highlights::<OutlineRowHighlights>();
active_editor.focus(cx);