Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1d8c41f

Browse files
authored
Merge pull request #266 from Muscraft/suggestion-window
fix: Continue suggestion window if there are more elements
2 parents 65b4022 + f4c3a2c commit 1d8c41f

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

‎src/renderer/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ impl Renderer {
367367
primary_path.or(og_primary_path),
368368
matches_previous_suggestion,
369369
is_first,
370+
//matches!(peek, Some(Element::Message(_) | Element::Padding(_))),
371+
peek.is_some(),
370372
);
371373

372374
if matches!(peek, Some(Element::Suggestion(_))) {
@@ -1619,6 +1621,7 @@ impl Renderer {
16191621
primary_path: Option<&Cow<'_, str>>,
16201622
matches_previous_suggestion: bool,
16211623
is_first: bool,
1624+
is_cont: bool,
16221625
) {
16231626
let suggestions = sm.splice_lines(suggestion.markers.clone());
16241627

@@ -2010,7 +2013,11 @@ impl Renderer {
20102013
| DisplaySuggestion::Underline => row_num - 1,
20112014
DisplaySuggestion::None => row_num,
20122015
};
2013-
self.draw_col_separator_end(buffer, row, max_line_num_len + 1);
2016+
if is_cont {
2017+
self.draw_col_separator_no_space(buffer, row, max_line_num_len + 1);
2018+
} else {
2019+
self.draw_col_separator_end(buffer, row, max_line_num_len + 1);
2020+
}
20142021
row_num = row + 1;
20152022
}
20162023
}

‎tests/rustc_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,7 +4071,7 @@ LL + use std::collections::binary_heap::IntoIter;
40714071
LL + use std::collections::btree_map::IntoIter;
40724072
├╴
40734073
LL + use std::collections::btree_set::IntoIter;
4074-
╰╴
4074+
40754075
╰ and 9 other candidates
40764076
"#]];
40774077
let renderer = renderer.theme(OutputTheme::Unicode);
@@ -4392,7 +4392,7 @@ LL - wtf: None,
43924392
LL - x: (),
43934393
LL - })),
43944394
LL + wtf: Some(Box::new_in(_, _)),
4395-
╰╴
4395+
43964396
╰ and 12 other candidates
43974397
help: consider using the `Default` trait
43984398
╭╴
@@ -4528,7 +4528,7 @@ LL │ t.a1.bar();
45284528
LL │ t.a2.bar();
45294529
├╴ +++
45304530
LL │ t.a3.bar();
4531-
╰╴ +++
4531+
+++
45324532
╰ and 6 other candidates
45334533
"#]];
45344534
let renderer = renderer.theme(OutputTheme::Unicode);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /