Theme hints and suggestions differently
This commit is contained in:
parent
3312c9114b
commit
480d8c511b
9 changed files with 105 additions and 49 deletions
|
@ -573,9 +573,15 @@ impl<'a> BlockMapWriter<'a> {
|
|||
impl BlockSnapshot {
|
||||
#[cfg(test)]
|
||||
pub fn text(&self) -> String {
|
||||
self.chunks(0..self.transforms.summary().output_rows, false, None, None)
|
||||
.map(|chunk| chunk.text)
|
||||
.collect()
|
||||
self.chunks(
|
||||
0..self.transforms.summary().output_rows,
|
||||
false,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.map(|chunk| chunk.text)
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn chunks<'a>(
|
||||
|
@ -583,7 +589,8 @@ impl BlockSnapshot {
|
|||
rows: Range<u32>,
|
||||
language_aware: bool,
|
||||
text_highlights: Option<&'a TextHighlights>,
|
||||
inlay_highlights: Option<HighlightStyle>,
|
||||
hint_highlights: Option<HighlightStyle>,
|
||||
suggestion_highlights: Option<HighlightStyle>,
|
||||
) -> BlockChunks<'a> {
|
||||
let max_output_row = cmp::min(rows.end, self.transforms.summary().output_rows);
|
||||
let mut cursor = self.transforms.cursor::<(BlockRow, WrapRow)>();
|
||||
|
@ -616,7 +623,8 @@ impl BlockSnapshot {
|
|||
input_start..input_end,
|
||||
language_aware,
|
||||
text_highlights,
|
||||
inlay_highlights,
|
||||
hint_highlights,
|
||||
suggestion_highlights,
|
||||
),
|
||||
input_chunk: Default::default(),
|
||||
transforms: cursor,
|
||||
|
@ -1495,6 +1503,7 @@ mod tests {
|
|||
false,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.map(|chunk| chunk.text)
|
||||
.collect::<String>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue