Browse Source

statusbar: don't overwrite num buffer when progress spinner is deactivated

jmap-eventsource
Manos Pitsidianakis 1 year ago
parent
commit
126ed8a189
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 14
      src/components/utilities.rs

14
src/components/utilities.rs

@ -154,13 +154,6 @@ impl StatusBar {
if self.progress_spinner.is_active() {
x = x.saturating_sub(1 + self.progress_spinner.width);
}
for (idx, c) in self.display_buffer.chars().rev().enumerate() {
if let Some(cell) = grid.get_mut(x.saturating_sub(idx).saturating_sub(1), y) {
cell.set_ch(c);
} else {
break;
}
}
if self.progress_spinner.is_dirty() {
self.progress_spinner.draw(
grid,
@ -171,6 +164,13 @@ impl StatusBar {
context,
);
}
for (idx, c) in self.display_buffer.chars().rev().enumerate() {
if let Some(cell) = grid.get_mut(x.saturating_sub(idx).saturating_sub(1), y) {
cell.set_ch(c);
} else {
break;
}
}
context.dirty_areas.push_back(area);
}

Loading…
Cancel
Save