Unified · Split
| @@ -7738,12 +7738,7 @@ impl Editor { · 7737 unmodified lines | ||
| 7738 | 7738 | } |
| 7739 | 7739 | }) |
| 7740 | 7740 | .await; |
| 7741 | − let rows = Self::refresh_runnable_display_rows( | |
| 7742 | − project, | |
| 7743 | − display_snapshot, | |
| 7744 | − new_rows, | |
| 7745 | − cx.clone(), | |
| 7746 | − ); | |
| 7741 | + let rows = Self::runnable_rows(project, display_snapshot, new_rows, cx.clone()); | |
| 7747 | 7742 | |
| 7748 | 7743 | this.update(&mut cx, |this, _| { |
| 7749 | 7744 | this.clear_tasks(); |
| @@ -7760,7 +7755,8 @@ impl Editor { · 10 unmodified lines | ||
| 7760 | 7755 | ) -> Vec<(Range<usize>, Runnable)> { |
| 7761 | 7756 | snapshot.buffer_snapshot.runnable_ranges(range).collect() |
| 7762 | 7757 | } |
| 7763 | − fn refresh_runnable_display_rows( | |
| 7758 | + | |
| 7759 | + fn runnable_rows( | |
| 7764 | 7760 | project: Model<Project>, |
| 7765 | 7761 | snapshot: DisplaySnapshot, |
| 7766 | 7762 | runnable_ranges: Vec<(Range<usize>, Runnable)>, |
| @@ -7775,12 +7771,12 @@ impl Editor { · 8 unmodified lines | ||
| 7775 | 7771 | if tasks.is_empty() { |
| 7776 | 7772 | return None; |
| 7777 | 7773 | } |
| 7778 | − let point = multi_buffer_range.start.to_display_point(&snapshot); | |
| 7774 | + let point = multi_buffer_range.start.to_point(&snapshot.buffer_snapshot); | |
| 7779 | 7775 | Some(( |
| 7780 | − point.row(), | |
| 7776 | + point.row, | |
| 7781 | 7777 | RunnableTasks { |
| 7782 | 7778 | templates: tasks, |
| 7783 | − column: point.column(), | |
| 7779 | + column: point.column, | |
| 7784 | 7780 | }, |
| 7785 | 7781 | )) |
| 7786 | 7782 | }) |
| @@ -1381,6 +1381,7 @@ impl EditorElement { · 1380 unmodified lines | ||
| 1381 | 1381 | scroll_pixel_position: gpui::Point<Pixels>, |
| 1382 | 1382 | gutter_dimensions: &GutterDimensions, |
| 1383 | 1383 | gutter_hitbox: &Hitbox, |
| 1384 | + snapshot: &EditorSnapshot, | |
| 1384 | 1385 | cx: &mut WindowContext, |
| 1385 | 1386 | ) -> Vec<AnyElement> { |
| 1386 | 1387 | self.editor.update(cx, |editor, cx| { |
| @@ -1409,10 +1410,12 @@ impl EditorElement { · 22 unmodified lines | ||
| 1409 | 1410 | *row, |
| 1410 | 1411 | cx, |
| 1411 | 1412 | ); |
| 1412 | − | |
| 1413 | + let display_row = Point::new(*row, 0) | |
| 1414 | + .to_display_point(&snapshot.display_snapshot) | |
| 1415 | + .row(); | |
| 1413 | 1416 | let button = prepaint_gutter_button( |
| 1414 | 1417 | button, |
| 1415 | − *row, | |
| 1418 | + display_row, | |
| 1416 | 1419 | line_height, |
| 1417 | 1420 | gutter_dimensions, |
| 1418 | 1421 | scroll_pixel_position, |
| @@ -4043,6 +4046,7 @@ impl Element for EditorElement { · 2624 unmodified lines | ||
| 4043 | 4046 | scroll_pixel_position, |
| 4044 | 4047 | &gutter_dimensions, |
| 4045 | 4048 | &gutter_hitbox, |
| 4049 | + &snapshot, | |
| 4046 | 4050 | cx, |
| 4047 | 4051 | ); |
| 4048 | 4052 | |