Skip to content

Commit

Permalink
fix syntax highlight bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Jun 11, 2024
1 parent 3524465 commit f9f4b51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/ferrite-tui/src/widgets/editor_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl StatefulWidget for EditorWidget<'_> {
buf.set_stringn(
text_area.x + current_width as u16,
text_area.y + i as u16,
&text,
text,
text_area.width as usize,
theme,
);
Expand All @@ -170,9 +170,9 @@ impl StatefulWidget for EditorWidget<'_> {
let tab_width = tab_width_at(current_width, TAB_WIDTH);
if render_whitespace(current_width, line.text_end_col) {
dim_cells.push((current_width, i));
grapheme_buffer.push_str("→");
grapheme_buffer.push('→');
} else {
grapheme_buffer.push_str(" ");
grapheme_buffer.push(' ');
}
grapheme_buffer
.extend(std::iter::repeat(" ").take(tab_width.saturating_sub(1)));
Expand Down Expand Up @@ -281,7 +281,7 @@ impl StatefulWidget for EditorWidget<'_> {
match event {
HighlightEvent::Source { start, end } => {
if range.contains(start) || range.contains(end) {
let mut style = convert_style(&theme.dim_text);
let mut style = convert_style(&theme.text);
if let Some(highlight) = &highlight {
if let Some(name) = highlight
.query
Expand Down

0 comments on commit f9f4b51

Please sign in to comment.