mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-08-25 20:54:30 -04:00
Use upstream ratatuis (#154)
* Use upstream versions of ratatui crates * fmt * Update deps again * maybe we need to enable debug in mimalloc for windows? * try to fix windows dll linking with mimalloc * Update to latest version of mimalloc fork
This commit is contained in:
+3
-12
@@ -1,23 +1,14 @@
|
||||
use std::num::NonZeroUsize;
|
||||
|
||||
use ratatui::widgets::Widget;
|
||||
use ratatui::{prelude::buffer::CellDiffOption, widgets::Widget};
|
||||
|
||||
pub struct Skip {
|
||||
skip: bool
|
||||
}
|
||||
|
||||
impl Skip {
|
||||
#[must_use]
|
||||
pub fn new(skip: bool) -> Self {
|
||||
Self { skip }
|
||||
}
|
||||
}
|
||||
pub struct Skip;
|
||||
|
||||
impl Widget for Skip {
|
||||
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer) {
|
||||
for x in area.x..(area.x + area.width) {
|
||||
for y in area.y..(area.y + area.height) {
|
||||
buf[(x, y)].skip = self.skip;
|
||||
buf[(x, y)].diff_option = CellDiffOption::Skip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user