Skip to content

Commit

Permalink
Working prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindbergem committed Aug 29, 2024
1 parent c07e2e5 commit fe58866
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 75 deletions.
3 changes: 1 addition & 2 deletions examples/noline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ fn main() {
.unwrap();

let mut context = Context::default();
let mut r =
Runner::new(&mut editor, ROOT_MENU, io, &mut context);
let mut r = Runner::new(&mut editor, ROOT_MENU, io, &mut context);

while let Ok(_) = r.input_line(&mut context) {}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn main() {
let mut context = Context::default();
let mut r = Runner::new(&mut buffer, ROOT_MENU, Output(window), &mut context);
loop {
match r.interface().0.getch() {
match r.interface.0.getch() {
Some(Input::Character('\n')) => {
r.input_byte(b'\r', &mut context);
}
Expand All @@ -123,7 +123,7 @@ fn main() {
}
Some(Input::KeyDC) => break,
Some(input) => {
r.interface().0.addstr(&format!("{:?}", input));
r.interface.0.addstr(&format!("{:?}", input));
}
None => (),
}
Expand Down
Loading

0 comments on commit fe58866

Please sign in to comment.