Theme hints and suggestions differently

This commit is contained in:
Kirill Bulatov 2023-06-26 21:34:50 +03:00
parent 3312c9114b
commit 480d8c511b
9 changed files with 105 additions and 49 deletions

View file

@ -446,6 +446,7 @@ impl WrapSnapshot {
false,
None,
None,
None,
);
let mut edit_transforms = Vec::<Transform>::new();
for _ in edit.new_rows.start..edit.new_rows.end {
@ -575,7 +576,8 @@ impl WrapSnapshot {
rows: Range<u32>,
language_aware: bool,
text_highlights: Option<&'a TextHighlights>,
inlay_highlights: Option<HighlightStyle>,
hint_highlights: Option<HighlightStyle>,
suggestion_highlights: Option<HighlightStyle>,
) -> WrapChunks<'a> {
let output_start = WrapPoint::new(rows.start, 0);
let output_end = WrapPoint::new(rows.end, 0);
@ -593,7 +595,8 @@ impl WrapSnapshot {
input_start..input_end,
language_aware,
text_highlights,
inlay_highlights,
hint_highlights,
suggestion_highlights,
),
input_chunk: Default::default(),
output_position: output_start,
@ -1324,8 +1327,14 @@ mod tests {
}
pub fn text_chunks(&self, wrap_row: u32) -> impl Iterator<Item = &str> {
self.chunks(wrap_row..self.max_point().row() + 1, false, None, None)
.map(|h| h.text)
self.chunks(
wrap_row..self.max_point().row() + 1,
false,
None,
None,
None,
)
.map(|h| h.text)
}
fn verify_chunks(&mut self, rng: &mut impl Rng) {
@ -1348,7 +1357,7 @@ mod tests {
}
let actual_text = self
.chunks(start_row..end_row, true, None, None)
.chunks(start_row..end_row, true, None, None, None)
.map(|c| c.text)
.collect::<String>();
assert_eq!(