diff --git a/examples/expected_type.svg b/examples/expected_type.svg
index 7f02f0e5..15fc22dc 100644
--- a/examples/expected_type.svg
+++ b/examples/expected_type.svg
@@ -29,7 +29,7 @@
│ ──────────────── while parsing this struct
- ‡
+ ┆
29 │ range: <22, 25>,
diff --git a/examples/struct_name_as_context.svg b/examples/struct_name_as_context.svg
index b99aace6..37051401 100644
--- a/examples/struct_name_as_context.svg
+++ b/examples/struct_name_as_context.svg
@@ -27,7 +27,7 @@
1 │ struct S {
- ‡
+ ┆
6 │ fn foo() {},
diff --git a/src/renderer/render.rs b/src/renderer/render.rs
index a6a326dd..860d0e3f 100644
--- a/src/renderer/render.rs
+++ b/src/renderer/render.rs
@@ -717,7 +717,7 @@ fn render_snippet_annotations(
// the code in this line.
for (depth, style) in &multilines {
for line in previous_buffer_line..buffer.num_lines() {
- draw_multiline_line(renderer, buffer, line, width_offset, *depth, *style);
+ draw_multiline_line(renderer, buffer, line, width_offset, *depth, *style, false);
}
}
// check to see if we need to print out or elide lines that come between
@@ -740,6 +740,7 @@ fn render_snippet_annotations(
width_offset,
*depth,
*style,
+ true,
);
}
if let Some(line) = annotated_lines.get(annotated_line_idx) {
@@ -759,6 +760,7 @@ fn render_snippet_annotations(
} else {
ElementStyle::UnderlineSecondary
},
+ true,
);
}
}
@@ -792,6 +794,7 @@ fn render_snippet_annotations(
width_offset,
*depth,
*style,
+ false,
);
}
if let Some(line) = annotated_lines.get(annotated_line_idx) {
@@ -808,6 +811,7 @@ fn render_snippet_annotations(
} else {
ElementStyle::UnderlineSecondary
},
+ false,
);
}
}
@@ -2078,12 +2082,25 @@ fn draw_multiline_line(
offset: usize,
depth: usize,
style: ElementStyle,
+ elided: bool,
) {
let chr = match (style, renderer.decor_style) {
(ElementStyle::UnderlinePrimary | ElementStyle::LabelPrimary, DecorStyle::Ascii) => '|',
(_, DecorStyle::Ascii) => '|',
- (ElementStyle::UnderlinePrimary | ElementStyle::LabelPrimary, DecorStyle::Unicode) => '┃',
- (_, DecorStyle::Unicode) => '│',
+ (ElementStyle::UnderlinePrimary | ElementStyle::LabelPrimary, DecorStyle::Unicode) => {
+ if elided {
+ '┇'
+ } else {
+ '┃'
+ }
+ }
+ (_, DecorStyle::Unicode) => {
+ if elided {
+ '┆'
+ } else {
+ '│'
+ }
+ }
};
buffer.putc(line, offset + depth - 1, chr, style);
}
@@ -2203,7 +2220,7 @@ fn draw_note_separator(
fn draw_line_separator(renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, col: usize) {
let (column, dots) = match renderer.decor_style {
DecorStyle::Ascii => (0, "..."),
- DecorStyle::Unicode => (col - 2, "‡"),
+ DecorStyle::Unicode => (col - 2, "┆"),
};
buffer.puts(line, column, dots, ElementStyle::LineNumber);
}
diff --git a/tests/color/fold_ann_multiline.unicode.term.svg b/tests/color/fold_ann_multiline.unicode.term.svg
index bf8af136..c0ee8203 100644
--- a/tests/color/fold_ann_multiline.unicode.term.svg
+++ b/tests/color/fold_ann_multiline.unicode.term.svg
@@ -37,7 +37,7 @@
55 │ ┃ (Some(start), Some(end)) if start > end_index || end < start_index => continue,
- ‡ ┃
+ ┆ ┇
72 │ ┃ }
diff --git a/tests/color/highlight_duplicated_diff_lines.unicode.term.svg b/tests/color/highlight_duplicated_diff_lines.unicode.term.svg
index 7e180ae5..9d1c5bf2 100644
--- a/tests/color/highlight_duplicated_diff_lines.unicode.term.svg
+++ b/tests/color/highlight_duplicated_diff_lines.unicode.term.svg
@@ -31,7 +31,7 @@
│ ━━━━━━━━━━━━
- ‡
+ ┆
24 │ String::from(""),
diff --git a/tests/color/highlight_source.unicode.term.svg b/tests/color/highlight_source.unicode.term.svg
index c5867f85..2599bb2c 100644
--- a/tests/color/highlight_source.unicode.term.svg
+++ b/tests/color/highlight_source.unicode.term.svg
@@ -27,7 +27,7 @@
2 │ [workspace.lints.rust]
- ‡
+ ┆
9 │ unused_qualifications = "warn"
diff --git a/tests/color/issue_9.unicode.term.svg b/tests/color/issue_9.unicode.term.svg
index d0526ea0..e4ab65d8 100644
--- a/tests/color/issue_9.unicode.term.svg
+++ b/tests/color/issue_9.unicode.term.svg
@@ -29,7 +29,7 @@
│ ─ move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
- ‡
+ ┆
7 │ let y = x;
diff --git a/tests/color/multiple_highlight_duplicated.unicode.term.svg b/tests/color/multiple_highlight_duplicated.unicode.term.svg
index e4308a36..6d043d31 100644
--- a/tests/color/multiple_highlight_duplicated.unicode.term.svg
+++ b/tests/color/multiple_highlight_duplicated.unicode.term.svg
@@ -31,7 +31,7 @@
│ ━━━━━━━━━━━━
- ‡
+ ┆
24 │ String::from(""),
diff --git a/tests/formatter.rs b/tests/formatter.rs
index df045c86..85b49214 100644
--- a/tests/formatter.rs
+++ b/tests/formatter.rs
@@ -1700,7 +1700,7 @@ error[E0599]: no method named `pick` found for struct `Chaenomeles` in the curre
╭▸
3 │ pub struct Chaenomeles;
│ ────────────────────── method `pick` not found for this struct
- ‡
+ ┆
18 │ banana::Chaenomeles.pick()
│ ━━━━ method not found in `Chaenomeles`
╰╴
@@ -2491,7 +2491,7 @@ error[E0271]: type mismatch resolving `(
22 │ ┃ Err::<(), _>(
23 │ ┃ Ok::<_, ()>(
- ‡ ┃
+ ┆ ┇
32 │ ┃ )
│ ┗━━━━━┛ type mismatch resolving `, ...>>, ...> as Future>::Error == Foo`
╰╴
@@ -2602,7 +2602,7 @@ error[E0271]: type mismatch resolving `(
22 │ ┃ Err::<(), _>(
23 │ ┃ Ok::<_, ()>(
- ‡ ┃
+ ┆ ┇
32 │ ┃ )
│ ┗━━━━━┛ type mismatch resolving `, ...>>, ...> as Future>::Error == Foo`
╰╴
@@ -2785,7 +2785,7 @@ error[E0308]: mismatched types
25 │ │ Btype<
26 │ │ Ctype<
27 │ │ Atype<
- ‡ │
+ ┆ ┆
47 │ │ i32
48 │ │ > = Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(Ok(O…
│ │┏━━━━━│━━━┛
@@ -4309,7 +4309,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
╭▸
12 │ cargo
│ ━━━━━
- ‡
+ ┆
18 │ zappy
╰╴
"#]];
@@ -4800,7 +4800,7 @@ error: consider adding a `;` to the last statement for consistent formatting
5 │ ┃ if *x > 0 {
6 │ ┃ println!("Positive number");
7 │ ┃ } else {
- ‡ ┃
+ ┆ ┇
10 │ ┃ })
│ ┗━━━━━━┛
╰╴
diff --git a/tests/rustc_tests.rs b/tests/rustc_tests.rs
index 2d88f74a..41c9b9c2 100644
--- a/tests/rustc_tests.rs
+++ b/tests/rustc_tests.rs
@@ -77,7 +77,7 @@ error: foo
│
2 │ fn foo() {
│ ┏━━━━━━━━━━┛
- ‡ ┃
+ ┆ ┇
5 │ ┃ }
╰╴┗━━━┛ test
"#]];
@@ -1029,7 +1029,7 @@ error: foo
5 │ │ 1
6 │ │ 2
7 │ │ 3
- ‡ │
+ ┆ ┆
15 │ │ X2 Y2 Z2
16 │ │ X3 Y3 Z3
╰╴ └──────────┘ `Y` is a good letter too
@@ -1113,7 +1113,7 @@ error: foo
10 │ ┃│ 6
11 │ ┃│ X2 Y2 Z2
│ ┃└──────────┘ `Z` is a good letter too
- ‡ ┃
+ ┆ ┇
15 │ ┃ 10
16 │ ┃ X3 Y3 Z3
╰╴┗━━━━━━━━┛ `Y` is a good letter
@@ -1512,7 +1512,7 @@ note: required by a bound in `is_transmutable`
13 │ ┃ Assume {
14 │ ┃ alignment: true,
15 │ ┃ lifetimes: true,
- ‡ ┃
+ ┆ ┇
19 │ ┃ }>
╰╴┗━━━━━━━━━━┛ required by this bound in `is_transmutable`
"#]];
@@ -1806,7 +1806,7 @@ warning: non-local `macro_rules!` definition, `#[macro_export]` macro should be
│
4 │ macro_rules! outer_macro {
│ ──────────────────────── in this expansion of `nested_macro_rules::outer_macro!`
- ‡
+ ┆
7 │ ┏ macro_rules! inner_macro {
8 │ ┃ ($bang_macro:ident, $attr_macro:ident) => {
9 │ ┃ $bang_macro!($name);
@@ -2696,7 +2696,7 @@ error: unclosed frontmatter
╭▸ $DIR/unclosed-1.rs:1:1
│
1 │ ┏ ----cargo
- ‡ ┃
+ ┆ ┇
7 │ ┃
│ ┗━┛
╰╴
@@ -2769,7 +2769,7 @@ error: unclosed frontmatter
╭▸ $DIR/unclosed-2.rs:1:1
│
1 │ ┏ ----cargo
- ‡ ┃
+ ┆ ┇
14 │ ┃ "----"
15 │ ┃ }
│ ┗━━┛
@@ -2975,7 +2975,7 @@ error: unclosed frontmatter
╭▸ $DIR/unclosed-5.rs:1:1
│
1 │ ┏ ----cargo
- ‡ ┃
+ ┆ ┇
7 │ ┃
│ ┗━┛
╰╴
@@ -4166,7 +4166,7 @@ error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its
│
7 │ struct Ipv4Addr;
│ ─────────────── method `quote_into_iter` not found for this struct because it doesn't satisfy `Ipv4Addr: Iterator`, `Ipv4Addr: ToTokens`, `Ipv4Addr: proc_macro::ext::RepIteratorExt` or `Ipv4Addr: proc_macro::ext::RepToTokensExt`
- ‡
+ ┆
11 │ let _ = quote! { $($ip)* }; //~ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not sat…
│ ━━━━━━━━━━━━━━━━━━ method cannot be called on `Ipv4Addr` due to unsatisfied trait bounds
│
@@ -4265,7 +4265,7 @@ error[E0220]: associated type `Pr` not found for `S` in the current scope
│
12 │ struct S(T);
│ ─────────── associated type `Pr` not found for this struct
- ‡
+ ┆
28 │ let _: S::::Pr = ();
│ ━━ associated item not found in `S`
│
@@ -5499,7 +5499,7 @@ error[E0599]: no method named `bar` found for struct `Thing` in the current scop
│
1 │ struct Thing {
│ ──────────── method `bar` not found for this struct
- ‡
+ ┆
25 │ t.bar();
│ ━━━ method not found in `Thing`
╰╴
@@ -5801,7 +5801,7 @@ error[E0061]: this function takes 1 argument but 3 arguments were supplied
│
2 │ String::with_capacity(
│ ━━━━━━━━━━━━━━━━━━━━━
- ‡
+ ┆
5 │ ┌ r#"
6 │ │ pub(crate) struct Person {}
7 │ │ "#,