mirror of https://github.com/helix-editor/helix
fix typo in doc_formatter.rs
parent
2c0506aa96
commit
839f4d758d
|
@ -182,7 +182,7 @@ pub struct DocumentFormatter<'t> {
|
||||||
line_pos: usize,
|
line_pos: usize,
|
||||||
exhausted: bool,
|
exhausted: bool,
|
||||||
|
|
||||||
inline_anntoation_graphemes: Option<(Graphemes<'t>, Option<Highlight>)>,
|
inline_annotation_graphemes: Option<(Graphemes<'t>, Option<Highlight>)>,
|
||||||
|
|
||||||
// softwrap specific
|
// softwrap specific
|
||||||
/// The indentation of the current line
|
/// The indentation of the current line
|
||||||
|
@ -227,7 +227,7 @@ impl<'t> DocumentFormatter<'t> {
|
||||||
word_buf: Vec::with_capacity(64),
|
word_buf: Vec::with_capacity(64),
|
||||||
word_i: 0,
|
word_i: 0,
|
||||||
line_pos: block_line_idx,
|
line_pos: block_line_idx,
|
||||||
inline_anntoation_graphemes: None,
|
inline_annotation_graphemes: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ impl<'t> DocumentFormatter<'t> {
|
||||||
) -> Option<(&'t str, Option<Highlight>)> {
|
) -> Option<(&'t str, Option<Highlight>)> {
|
||||||
loop {
|
loop {
|
||||||
if let Some(&mut (ref mut annotation, highlight)) =
|
if let Some(&mut (ref mut annotation, highlight)) =
|
||||||
self.inline_anntoation_graphemes.as_mut()
|
self.inline_annotation_graphemes.as_mut()
|
||||||
{
|
{
|
||||||
if let Some(grapheme) = annotation.next() {
|
if let Some(grapheme) = annotation.next() {
|
||||||
return Some((grapheme, highlight));
|
return Some((grapheme, highlight));
|
||||||
|
@ -247,7 +247,7 @@ impl<'t> DocumentFormatter<'t> {
|
||||||
if let Some((annotation, highlight)) =
|
if let Some((annotation, highlight)) =
|
||||||
self.annotations.next_inline_annotation_at(char_pos)
|
self.annotations.next_inline_annotation_at(char_pos)
|
||||||
{
|
{
|
||||||
self.inline_anntoation_graphemes = Some((
|
self.inline_annotation_graphemes = Some((
|
||||||
UnicodeSegmentation::graphemes(&*annotation.text, true),
|
UnicodeSegmentation::graphemes(&*annotation.text, true),
|
||||||
highlight,
|
highlight,
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in New Issue