A simple CPU rendered GUI IDE experience.
fix tests
| -rw-r--r-- | src/main.rs | 13 | ||||
| -rw-r--r-- | src/text.rs | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index a318719..e9e69b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -418,22 +418,23 @@ impl BoolRequest { #[test] fn history_test() { let mut t = TextArea::default(); - let mut h = Hist { + let mut h = text::hist::Hist { history: vec![], redo_history: vec![], - last: t.clone(), - last_edit: Instant::now(), + last: default(), + lc: default(), + last_edit: std::time::Instant::now(), changed: false, }; t.insert("echo"); - h.push(&t); + h.push(&mut t); t.insert(" test"); - h.push(&t); + h.push(&mut t); h.undo(&mut t); h.redo(&mut t); h.undo(&mut t); t.insert(" good"); - h.push(&t); + h.push(&mut t); h.undo(&mut t); assert_eq!(t.rope.to_string(), "echo"); } diff --git a/src/text.rs b/src/text.rs index 0ba3e3c..bdf9078 100644 --- a/src/text.rs +++ b/src/text.rs @@ -1098,7 +1098,7 @@ pub fn man() { // .unwrap() // .0 // .to_string(), - |y| NAMES[y.idx()].to_string(), + |y| theme_treesitter::NAMES[y.idx()].to_string(), &syntax.inner, source.slice(..), .., @@ -1117,7 +1117,7 @@ pub fn man() { // .unwrap() // .0 // .to_string()) - .map(|x| NAMES[x.idx()]) + .map(|x| theme_treesitter::NAMES[x.idx()]) .collect::<Vec<_>>() ); // panic!() |