Skip to content

Commit

Permalink
fix overlapping pane text
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Jul 6, 2024
1 parent 03a2964 commit fa2bb73
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/ferrite-tui/src/widgets/editor_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ impl StatefulWidget for EditorWidget<'_> {
return;
}

for x in 0..area.width {
for y in 0..area.height {
let cell = buf.get_mut(x + area.x, y + area.y);
cell.set_symbol(" ");
}
}

let Self {
theme,
config,
Expand Down
7 changes: 7 additions & 0 deletions crates/ferrite-tui/src/widgets/logger_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ impl StatefulWidget for LoggerWidget<'_> {
return;
}

for x in 0..area.width {
for y in 0..area.height {
let cell = buf.get_mut(x + area.x, y + area.y);
cell.set_symbol(" ");
}
}

buf.set_style(area, convert_style(&self.theme.background));
for y in 0..area.height.saturating_sub(1) {
match state.messages.get(y as usize + state.lines_scrolled_up) {
Expand Down

0 comments on commit fa2bb73

Please sign in to comment.