Skip to content

Commit

Permalink
fix typo in doc_formatter.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalkuthe committed Mar 26, 2023
1 parent 0938b70 commit aeed88e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions helix-core/src/doc_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub struct DocumentFormatter<'t> {
line_pos: usize,
exhausted: bool,

inline_anntoation_graphemes: Option<(Graphemes<'t>, Option<Highlight>)>,
inline_annotation_graphemes: Option<(Graphemes<'t>, Option<Highlight>)>,

// softwrap specific
/// The indentation of the current line
Expand Down Expand Up @@ -227,7 +227,7 @@ impl<'t> DocumentFormatter<'t> {
word_buf: Vec::with_capacity(64),
word_i: 0,
line_pos: block_line_idx,
inline_anntoation_graphemes: None,
inline_annotation_graphemes: None,
}
}

Expand All @@ -237,7 +237,7 @@ impl<'t> DocumentFormatter<'t> {
) -> Option<(&'t str, Option<Highlight>)> {
loop {
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() {
return Some((grapheme, highlight));
Expand All @@ -247,7 +247,7 @@ impl<'t> DocumentFormatter<'t> {
if let Some((annotation, highlight)) =
self.annotations.next_inline_annotation_at(char_pos)
{
self.inline_anntoation_graphemes = Some((
self.inline_annotation_graphemes = Some((
UnicodeSegmentation::graphemes(&*annotation.text, true),
highlight,
))
Expand Down

0 comments on commit aeed88e

Please sign in to comment.