@@ -1098,8 +1098,7 @@ fn render_source_line(
10981098 if annotations_position
10991099 . iter ( )
11001100 . all ( |( _, ann) | matches ! ( ann. annotation_type, LineAnnotationType :: MultilineStart ( _) ) )
1101- {
1102- if let Some ( max_pos) = annotations_position. iter ( ) . map ( |( pos, _) | * pos) . max ( ) {
1101+ && let Some ( max_pos) = annotations_position. iter ( ) . map ( |( pos, _) | * pos) . max ( ) {
11031102 // Special case the following, so that we minimize overlapping multiline spans.
11041103 //
11051104 // 3 │ X0 Y0 Z0
@@ -1119,7 +1118,6 @@ fn render_source_line(
11191118 // one line of vertical space.
11201119 line_len = line_len. saturating_sub ( 1 ) ;
11211120 }
1122- }
11231121
11241122 // Write the column separator.
11251123 //
@@ -1447,41 +1445,38 @@ fn emit_suggestion_default(
14471445 let ( complete, parts, highlights) = spliced_lines;
14481446 let is_multiline = complete. lines ( ) . count ( ) > 1 ;
14491447
1450- match suggestion. path . as_ref ( ) {
1451- Some ( path) if suggestion. path . as_ref ( ) != primary_path && !matches_previous_suggestion => {
1452- let ( loc, _) = sm. span_to_locations ( parts[ 0 ] . span . clone ( ) ) ;
1453- let origin = Origin :: path ( path. as_ref ( ) )
1454- . line ( loc. line )
1455- . char_column ( loc. char + 1 ) ;
1456-
1457- render_origin (
1458- renderer,
1459- buffer,
1460- max_line_num_len,
1461- & origin,
1462- true ,
1463- is_first,
1464- !is_cont,
1465- row_num - 1 ,
1466- ) ;
1467- row_num += 1 ;
1468-
1469- draw_col_separator_no_space ( renderer, buffer, row_num - 1 , max_line_num_len + 1 ) ;
1470- }
1448+ if suggestion. path . as_ref ( ) != primary_path
1449+ && let Some ( path) = suggestion. path . as_ref ( )
1450+ && !matches_previous_suggestion
1451+ {
1452+ let ( loc, _) = sm. span_to_locations ( parts[ 0 ] . span . clone ( ) ) ;
1453+ let origin = Origin :: path ( path. as_ref ( ) )
1454+ . line ( loc. line )
1455+ . char_column ( loc. char + 1 ) ;
14711456
1472- _ if matches_previous_suggestion => {
1473- buffer. puts (
1474- row_num - 1 ,
1475- max_line_num_len + 1 ,
1476- renderer. decor_style . multi_suggestion_separator ( ) ,
1477- ElementStyle :: LineNumber ,
1478- ) ;
1479- }
1457+ render_origin (
1458+ renderer,
1459+ buffer,
1460+ max_line_num_len,
1461+ & origin,
1462+ true ,
1463+ is_first,
1464+ !is_cont,
1465+ row_num - 1 ,
1466+ ) ;
14801467
1481- _ => {
1482- draw_col_separator_start ( renderer, buffer, row_num - 1 , max_line_num_len + 1 ) ;
1483- }
1484- }
1468+ draw_col_separator_no_space ( renderer, buffer, row_num, max_line_num_len + 1 ) ;
1469+ row_num += 1 ;
1470+ } else if matches_previous_suggestion {
1471+ buffer. puts (
1472+ row_num - 1 ,
1473+ max_line_num_len + 1 ,
1474+ renderer. decor_style . multi_suggestion_separator ( ) ,
1475+ ElementStyle :: LineNumber ,
1476+ ) ;
1477+ } else {
1478+ draw_col_separator_start ( renderer, buffer, row_num - 1 , max_line_num_len + 1 ) ;
1479+ }
14851480
14861481 if let DisplaySuggestion :: Diff = show_code_change {
14871482 row_num += 1 ;
0 commit comments